Sorry to sound angry. Major appliances are expensive and now have to be replaced every 5 years or so is insult to injury. Plus, a couple of expensive visits from the repairman. An old appliances lasted 20 years or more.
For example: we bought our washer in 1989 and our gas dryer in 1993. Both are still running great! Knock on wood.
So... if you have an appliance made before 2000, consider repairing it instead of buying a new one. The repaired appliance may last longer than a brand new one.
We bought our first washer and dryer at a garage sale. The dryer squeaked and we paid $75 for it. A $2 takeup reel fixed it. The washer leaked and they threw it in for free. That cost $19 to repair. Myself.
They lasted at least ten years. Been through 3 washers since then in 15 years.