Difficulty is swallowing or dysphagia should be evaluated properly. It can be due to inflammation of the food-pipe, ulcers or acid reflux. Eosinophilic esophagitis is an allergic condition of the food-pipe that causes dysphagia in young people.
In older adults, cancer of the food-pipe can cause difficulty in swallowing. Disorders of the muscle of the food-pipe called esophageal motility disorders also cause dysphagia. Investigations for dysphagia include upper endoscopy, barium swallow and esophageal manometry.
To know more about causes and evaluation of dysphagia, please see the links below.
https://patient.info/digestive-health/difficulty-swallowing-dysphagia
https://www.nhs.uk/conditions/swallowing-problems-dysphagia/
https://www.uptodate.com/contents/achalasia-beyond-the-basics
https://www.asge.org/home/for-patients/patient-information/understanding-esophageal-manometry