How are the in-flight meals cooked?
In general, food for commercial coach passengers is made on the ground and then stored on the plane in special refridgerators, until it is time to eat.
The food is then heated in convection ovens and served. Sometimes there are special occasions for higher class seats/airliners.

Safety standards and space constraints mean your food’s made on the ground, near the airport. Big boys like LSG Sky Chefs produce 15,000 bread rolls every hour (24hrs a day, 365 days/yr), and 30,000 sandwiches a day.
As a rule of thumb, food is prepared 10hrs before it gets eaten. Those “Made Fresh!” stickers are there to mock you. It’s not ready-to-eat by any means at this stage; generally, chicken is cooked 60% of the way, and steak 30% to done, with the final phase occurring onboard. Once cooked, it gets blast-chilled in special fridges -- in a not-quite-frozen-but-not-edible state, your food awaits transfer to the tarmac.
Flight on time? Food on the plane? Time to finish the prep-work. Contrary to what most people think, planes generally don’t have microwaves. Your little tray makes its way into a convection oven for about 20min. Convection ovens have a fan (which pushes hot air onto the food) that's both faster and means a lower cooking temp.

https://www.thrillist.com/travel/nation/airline-meals-how-your-airplane-food-is-made-thrillist-nation