Likely it’s a bad thermostat, but the simplest thing is to check everything with a multimeter. There is a walk-through in Tanklets, on my main site, here: https://www.waterheaterrescue.com/Troubleshooting/Tanklets/electric-water-heater-issues.html . No matter what it is, running through this will find it.
If you don’t know how to use a multimeter or are not comfortable working with 220 volts, get an electrician or plumber to do it. These things are common to electric water heaters and are not grounds for buying a new one.