Every load takes the power that it wants to take.
That is decided by you switching it on. If you run a dryer load, the dryer is going to take 5500 VA give or take.
VA = Volts x Amps, similar to Watts. It is a rate of flow of energy. When we think about overloading panels, this is the usual figure that is used. It is simplest, and avoids 120/240V complications.
When the water heater cycles on, it takes 4500 VA when it's on.
Take the breaker on your main panel, multiply by 240V. If it's 100 A, then that's 24,000 VA. Get it? Don't plan to exceed 80% of that.
If you have a subpanel, that works the same way - multiply the breaker amps x 240V = rating VA, then multiply by 80% (0.8) for the limit of what you can plan to use.
Now, if you've been following along, you may notice both your dryer and water heater have 30 amp breakers. Yet one is 5500 VA and the other is 4500 VA. Yes, the breaker does not indicate the power the device takes! The device does. Each device will have a nameplate which states that, either in volts and amps, or VA, or watts.
The panel doesn't have any way to slow down the power.
Whatever your loads draw, that rolls right through the panels. There is nothing in the panel that will limit current.
Except for the circuit breaker, of course. But you're not allowed to plan to use more than 80% of breaker trip, as said.
The breaker has is highly forgiving and will allow short term overloads. (e.g. to allow motors to start up).
Load Calculation
If you are studying whether the main panel or subpanel is big enough for its loads, then you do a Load Calculation, which is a procedure described by NEC Article 220, and documented many places. It uses the "VA" figure. The Load Calculation uses some "catch-all" figures which cover almost all 120V loads, so you don't have to count them for the most part.
All the loads in the house come through the main panel. If a load comes out of a subpanel, then the power flows through both the main panel and the subpanel. It's possible to chain subpanels, of course.
When you do a Load Calculation, you figure for all the loads fed by that panel. Including loads that come through a panel to another panel.
Number of breakers in the panel has nothing to do with it.
Lots of people have panels that are full, because someone in the past decided to save a few dollars by skimping on breaker spaces. I sure hope they enjoyed that pizza.
The number of spaces in use doesn't have all that much to do with whether the panel is overloaded. The Load Calculation tells you the facts there.