You have a problem that would be easy to address.
Thre are a couple of micro-interlock swithes that enable
or disable the unit; ready for power when the door is shut,
disabled from power when the door is open.
Try the most obvious, and spray some contact cleaner
in the opening where you can see these small interlocks,
usually in the unit's door jamb, at the microwave, near the right edge.
Quickly, before the contact cleaner dries, try opening and closing the door several
times to work the cleaner into the contacts.
If this doesn't work, it should be a repair that would be straight forward.
I would charge about $100; shop around, different shops; you may even get it
Best of luck!