Water will not drain
First, check for blockages.
Check the bottom of the washer for any broken glass, paper, plastic etc that can be blocking the drain.
Then check the hose and where it dumps into the homes main drain system.(Typically found under the sink attached to the garbage disposal or drain off the sink basin)
If the garbage disposal is bad or clogged, it can cause the DW to not drain as well.
If you have no blockages, then you likely have a bad pump.
If that's the case, check to see if the unit is under warranty.
If not, it is not uncommon for the cost of replacing a pump to approach the cost of buying a new washer. Especially if the washer is quite old or a near base model.
The parts alone typically cost 60 to 120 bucks. If you have to pay a tech to perform the labor, expect to pay between 175 to 275.
It is much easier to replace a DW than it is to replace the pump. So if you are unfortunate enough to have a bad pump, my advice would be to buy a new washer, and install it yourself.
I will be happy to help you with that as well.
(It's basically two hoses and three wires.)
Please don't forget to rate this solution.