Is this a millivolt heater? Electronic? Most problems with heaters are not heater problems, but symptoms of other areas, most often dirty/clogged filters(s), old cartridges, clogged plumbing, clogged valve(s), clogged pump. All water-flow issues need to be resolved before addressing the heater. Is thee a separate (Jandy, Compool, etc.) controller? Does it work properly?

After that, it is best to have a competent, trained heater service pro look at a heater. It is safer that way. Also, you may have more than one problem with the heater or it may not be safe to repair. Last year, most of my heater service calls involved multiple (bad switch and valve, bad t'stat and safety switch, etc.) problems per heater. Better to pay a service call than find out the hard way.