If your shower head uses 2.1 gallons of water per minute and you take a 20 minute shower then your 20 minute shower would use around 40 gallons of water for each 20 minute shower.
So to take a 20 minute shower your water heater should have a capacity of at least 40 gallons but a bigger water heater is even better to provide hot water to your shower as well as other parts of the house.