✈️ with a 2month old

I will be flying with my 2 month old (only a 2hr flight) and my pediatrician told me to have her suck on her bottle while take off and while landing. Something about her ears, does anybody know about this, does it actually help her ears ???