Preparing food and cooking food are two different things.
I wouldn't even say making a grilled cheese would be cooking. I don't think heat has anything to do with it. I mean, am I cooking if I'm microwaving a frozen dinner? Are the "cooks" at an Applebee's cooking if all they do is warm up bags of premade food and microwave steaks?
I would say cooking requires you to prepare ingredients, combine them, and cook them.
I had thought of editing the title to include microwaving food, too. I would say "I cooked it in the microwave" but it at the same time absolutely does not have the same weight as "I cooked this" implying I did all the work and not just re-heating someone else's.
I mean, you could cook something in the microwave. Like microwaving a potato in order to make mashed potatoes, or heating other things to create a dish. Like I used to microwave spaghetti squash and then shred up the strands to make spaghetti.
But like, if I reheated some leftovers, or put a frozen dinner in the microwave, Id probably say "I microwaved this" or "I heated this".
I like this definition the best. If someone is making a super complex sandwich with many ingredients and passion, then I'm fine to call that cooking. Same with a cold soup, a cous-cous salad or a fancy appetizer. Many dishes in top notch cuisine are served cold. In molecular kitchen, there's even stuff served below freezing. Still all cooking to me.
If someone just warms up a can of Ravioli, microwaves convinience food, etc. I'd consider that rather food prep. If using the microwave is just one step of multiple in a recipe, than that's fine again.
For me cooking requires a minimum level of effort rather than a minimum level of heat.