What medicine did he give you? There might be a better medication for you. Have you tried eliminating all lactose from your diet?
the doctor gave tablets for acidity .... she also advised me to avoid junk food and spicy food in my diet
Welcome to the gastroenterology community! It could be acid reflux or a food intolerance. Have you tried eliminating all lactose from your diet? Have you tried any acid reflux medication (with permission from your doctor)?