Substitute first

:%s/foo/fizz will replace the first instance of foo on each line with fizz.

:%s/foo/fizz/g will replace the all instances of foo with fizz.

:%s/foo/fizz/c will make you confirm each change. y for yes, n for no, a for yes too remaining. g and c can be combined if you want to match every foo and confirm each change - :%s/foo/fizz/gc

Further Reading

:h :s :h /

More Gifs