What can be the possible reason for me occasionally having dry cough episodes that last about half an hour? Please read description below.?

August 2019 was the first time I experienced a dry cough that lasted about half an hour and that happend during lying, trying to fall asleep. Something was triggering the cough. From then till now it happened occasionally. While time was passing, the episodes were becoming less frequent and less severe. I'm 24 now and was a heavy smoker from 15 untill 21 (when I quitted smoking). I also have GERD. I successfully recovered from COVID-19 a month ago. What are the possible reasons? Could it be lung cancer or COPD? Or just some allergy?

2017-04-11T00:37:33.809Z