Inhalers are not just for asthma - bad colds like yours also can cause the lungs to swell and become overactive to items, it's called reactive airways. This may or may not be asthma or lead to it in the future. You may only have to use the inhaler or a few months or it may be a long term thing for you now, time will tell.
Asthma has a component that is genetic but has also pop up randomly. It is more common in those with allergies or if anyone in your family has any type of allergies (drug, food, environmental) then you are at higher risk. I am the only one who has asthma but both my parents have allergies.
Use the inhaler as directly by your doctor for the length of time they said and then revisit and ask if you can stop using it or should continue.
Hope you are feeling better!