Maytag Bravos dU error code on starting up

This washing machine when starting up clicks the lid lock several times, then shows dU on the display, flashes the lights around the dial and beeps three times over and over. Sometimes leaving it unplugged for hours will clear it up, sometimes not. Sometimes it will be fine for a while, then start having problems by itself without being touched. Once it gets past this, it runs fine.

I’m assuming the lid lock is failing and needs replacing, but I want to be sure before I buy one. Is this the correct step?

Thanks!