The answer to 'which is better tankless water heater or tank water heater' is that tankless water heaters are generally considered better for most homes. Tankless water heaters heat water on demand, only using energy when you need hot water, which can save you money on your energy bills. They also take up less space than traditional tank water heaters and can last longer, often 20 years or more. However, tankless water heaters have a higher upfront cost and may require upgrading your home's electrical or gas system to support the increased demand.
Tank water heaters, on the other hand, are more affordable upfront and may be better suited for homes with high hot water demand or limited electrical/gas capacity. They store a reserve of hot water, so you don't have to wait for it to heat up, but they use energy constantly to maintain the tank temperature, even when not in use.