Looking for long term saving > Tankless seems to be better, life span and considered more energy efficient.
But might have a problem with temp if you do laundry, use dishwasher and decide it's shower time when they are running.
But if not overloaded with chores tankless is supposed to get you hot water faster.
Also repair costs are higher.
Need to check warranty and if only 15 years a tankless repair might set you back more they you realize when you pay for repairs after the warranty expired.
Tank type, usually have a 5-6 year warranty , but some of the more expensive ones might be 10.
Warranties is something to look into when deciding which brand and what type to buy
Tank type recommenced draining once a year, preventive maintenance, especially in hard water areas.
That can be a do it yourself ,without calling a plumber.
Tankless water heaters also need the system to be flushed , especially in hard water areas and filters cleaned
Also It's important to make sure that the burners, circulating air passageways and control compartments are clean and free of dust and debris.
Also flushing the system is recommended to keep it in good shape.
If you're handy, instructions that come with unit should show how to maintain it.
If you're not the hands on type,call a pro and pay
Life span of around ten years is a minus for tank compared to tankless' supposed 20-30 year lifetime ;
Instillation cost for tank type is cheaper but the energy use is said to be a little higher that tankless because of the water being heated and reheated in take type, while tankless
Also so seem to take some time in some places to deliver hot water quickly.
One thing to think about before choosing, a minor thing but worth thinking about, which one would help increase the value of house if you decide to sell.