Although I agree with the other answer that this is a Jackson change; that doesn't mean there isn't an in-universe justification for Sauron's actions.
When Sauron came to kill the armies of Men and Elves, Elendil comes by. Unfortunately, Elendil was killed by Sauron's mace
Why Sauron didn't just kill Isildur instead of breaking the sword?
Swords are considerably faster to wield than maces. A mace needs to build up kinetic energy before it can really hurt you, but a sword can stab and cut with considerably less energy put into it.
When swinging his mace, Sauron was open to being stabbed with the faster sword. So he therefore first tries to render Isildur incapable of fighting back.
You could argue that Sauron should feel (and act) invincible due to the One Ring (and therefore does not need to worry about a sword stabbing him); but then again, his fingers weren't protected by the Ring either, not even the finger on which he actually wore the Ring.
So that proves that Sauron is still vulnerable to physical harm, and it makes sense why he tries to avoid getting stabbed by Narsil.
Note: You can argue that Sauron is much more powerful than Isildur and can wield his mace faster than Isildur can wield his sword. However, I have no proof as to the exact strength of Sauron, so it's hard to make this claim.