Samsung drain codes show up as 5E or 5C on common models, along with standing water in the tub. When a Samsung dishwasher is connected to a garbage disposal, the first suspect is the disposal's dishwasher inlet. A disposal that was replaced, or a new installation, ships with a small plug inside that inlet. It has to be knocked out before water can pass. If it was left in, the dishwasher fills and washes, then cannot drain. That is a quick check and does not need a new pump.
Next in line is the drain hose behind the machine. A hose pinched during installation, or one that has lost its high loop, will drain slowly or let sink water siphon back. Some kitchens use an air gap on the countertop. A grease-clogged air gap can block the dishwasher without any sign at the sink. Once the plumbing is cleared, we check the filter and the pump impeller for glass and food debris before replacing anything.
The Samsung 5E error page and the not draining guide go into more detail.