whirlpool top load washer aggitates but not drain or spin

MAching will only agitate in all modes, lid switch is ok, will not drain , or spin , I can hear the timer working (buzzing sound as usual) , I’m thinking a worn out relay ?