Modern tanks have a label on them that will let you know how many gallons of hot water it can deliver in its first hour of usage, some of those numbers are much lower than others.
The system also heats the tank to at least 60 degrees C at the sensor point (about 2/3 of the way down) at least once every 24 hours and then has a tempering valve on the output for safety. That way you don't have scalding water at the point of use, but do have lots of hot water available and no issues with Legionella bacteria.
As a kid my family had off-peak water heating, 200 gallons of water heaters, that were only turned on for a couple hours at midnight. We ran out of hot water about every 5 years - when mom did a lot of laundry and we all took long showers/baths on the same day. One time the breaker blew and we suspect it was 2 days before we noticed.