system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does dubbing work in live-action movies?

Suppose you're shooting a movie. The actors do their work, and you also record their voices while they're acting. Additional audio stuff like music and sound effects is added later.

But now suppose you want to dub the movie in another language. You can't just slap music and stuff onto the project, but you (somehow) need to remove the voices of the original actors and then slap those of the new voice actors onto the film. Except if you cut that out, you'd also have to cut out all environmental noise, etc. And if you do that, you'd basically have to recreate every single sound required.

So how exactly does this work? Are movies shot with and without sound simultaneously? Or is there some technological means to separate the sound from the image?
gpt
MOST of the environmental sound in most movies is in fact added in later by foley artists.

Not always the case for every movie or even every scene, but quite often it’s added later. Even background birds, traffic, etc.  You try to isolate the actors.  Sometimes you have to get them to dub their lines in the same language if there’s a noisy scene, or there’s something that couldn’t be cut around in editing.