Maytag top-load washer making loud noise during wash cycle

My washer started making a loud rattling noise on the wash cycle and wasn’t drying clothes as well on the spin cycle. The spin cycle seems to spin nice and fast and the brake seems to work well. I replaced the water pump but that did not fix the problem. Any suggestions? The noise is only on the wash cycles so I’m guessing it has something to do with agitation??