In addition to the other good answers, I'd like to address your sentence:
I may want to shoot a portrait of my kids on the beach at one moment,
and then shoot a picture of them surfing far away next.
As you gain more experience, you won't just be reacting to what happens, but you'll decide the shots and looks that you want to get to tell a story. As you say, you want to get a portrait-like pose at the beach. Then you want some shots of them running into the waves with a surfboard. Then you want some shots of them riding waves. Then the family around a campfire in the evening.
Now you can start working backwards: what will be the lighting conditions, where will you need to stand, what lens will be an option, etc. You'll have the experience to decide if you can stall the kids for 6 seconds while you change lenses, or if you're going to run after them, up to your thighs in the water to get the shot with a 50mm, or if you'll run up the beach to get a better viewpoint and be willing to crop the photo a lot -- too much really, but oh well.
That doesn't mean that you don't keep your eyes open and end up in a situation where you have three or four seconds to get that shot that just popped up. And you may be caught in the wrong place, with the wrong lens and you have to live with missing the shot or shoot what you can and try to salvage it later or...
In fact, that's part of what distinguishes really good photographers from the rest of us: they visualize their goal when they're shooting. What will the final product look like? What is the effect/feeling I want? What do I want to emphasize, what do I want to isolate, what do I need to leave out? That helps with composition, exposure, etc, but also with lens selection.
(Of course, with experience also comes speed in lens changing. And decisions about tradeoffs: do you get a 70-200mm zoom, or 18-80mm zoom, a second camera, etc? I'm just addressing the planning factor.)