A zoom lens narrows the field of view, much like looking through a telescope: the subject grows while the camera remains in the same place. A dolly-in moves the camera itself, so perspective changes differently.
In an editor, animate a layer's scale and keep its center fixed for a similar size change. The demo enlarges the whole frame with the camera position held fixed; move the pointer to change the zoom anchor.
Optical zoom changes the field of view; if the camera position stays fixed, it does not change perspective. Digital zoom enlarges a crop through software and may resample it, so fine detail can degrade.
When to use
Use it to bring a subject closer without changing the viewpoint, or to make small text and controls briefly readable in a screen recording.