The oven has an electrical power supply. There are wires in the oven door lock circuit. The oven door lock wire harness needs to be replaced. The oven door lock assembly should be replaced if the wire harness is okay. The control board for the oven should be replaced if the problem recurs.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.