It should be `:s/bad/good`. Having `:%s` instead of `:s` means the substitution is applied to all lines in the file instead of just the current line.
It should be
:s/bad/good. Having:%sinstead of:smeans the substitution is applied to all lines in the file instead of just the current line.