@sancfk if you are talking about the lower over instead of the microwave then it is not the door switch in the microwave causing this. @mayer is of course correct if it is the microwave. If it is your oven, then it is possible that this is caused by a faulty door latch motor and switch assembly. All ovens of this model that are self cleaning have a lock that prevents the oven from being opened during the cycle. Sometimes, the door lock and switch assembly can become stuck and cause the oven to not work. The other possibility is a bad oven control board. If that board is broken, it may not send power to the components, which will cause the oven not to heat.
I'd be checking the switches on the latch assembly part number 33 in the diagram. The original Whirlpool part is Door latch Part #: 3171148 and it looks like this