Have you tried going to Home Depot and reading the labels on the water heraters they have there? It should give you a rough estimate of the size you need.
I believe the tankless ones are sized based on the flow per minute or something like that. There are smaller ones that are only suitable for a laundry room so you do have to be somewhat careful with what you buy.
Most of the time for a single apartment of one or two bedrooms a 30 or 40 gallon should be enough. I do have a tenant that likes to take baths and the 40 gallon tank isn’t really big enough for her. I think the tub is about 40 gallons and then afterwards she likes to wash dishes and it takes about an hour to heat up 40 gallons of water.
If you change the anode rod in a water heater every 3-4 years, the water heater could last 20 years. Home Depot doesn’t sell them though, you have to go to a home
Oh, for the anode rod, you’d have to go to plumber’s supply store. There’s a few books out there that will show you how to replace it. That’s really the secret between those 6 year or 12 year warranty hot water heaters. The 12 year ones typically have two anode rodes and the 6 year ones just have one.
You should also check with the local gas company. The one in my area also offers a rebate on the tankless water heaters. They use less gas as it only kicks in when you need it.