Can I replace a reaccurring word or name?

Some word processors allow you to replace a repeating word ( such as a name). I think they are referred to as “ Macros”.
I have a story that uses a persons name. For privacy reasons I have to replace this name throughout the whole document.
Rather then manually finding where this name occurs and replacing it each time ( eg : changing the name Paul to Peter throughout the whole story), is there any way this can be automatically set up ?