There is a continuous debate on which bike is the better- hardtail or dual suspension. The short answer is locked up in what the bike will be used for.
A hardtail is a mountain bike with a front shock to take the pumps and whatever else the terrain has to offer. It is capable to go off-road and faces gravel, soft sands, rocks, and roots. So for limited challenging conditions, the hardtail is perfect. It is lighter, cheaper and it is still an excellent comfortable ride. When it comes to downhill riding and extreme off-road conditions, the rider needs to use its technical skills, and here the legs and the tyres take the effect of the bumps on the back wheel. Then the maintenance is less.
A dual suspension is probably the best of all worlds. It has both a suspension in the front and the back. It is best when conditions are really challenging like long rides in tough conditions which include downhill riding. It can take bigger hits, steeper descents, and is more forgiving. (Less technical skills required). Less stress on the body also meaning you can ride longer in these conditions. It offers excellent handling and traction which gives the rider more confidence to manage technical conditions. The price and the weight are more but on an e-bike, weight is not an issue.
In conclusion. If you are not doing extreme mountain biking the hardtail is perfect and if you want the best of all worlds, the dual suspension gives you more versatility and allows you to do a bit extreme.