Could be a few causes, but the most common is the diode to the magnatron (M/w emitter) is fried, so insufficient voltage getting to the emitter to trigger it, or the magnatron itself is fried. (our kitchen one went with a loud bang).
There are also a couple of door switches. If one of those has failed the m/w won't heat but still light up and spin.
If magnatron, its cheaper to replace the whole unit. Even the testing of the other bits may not be worth it.....
But it will be under warranty, so get it checked by dealer