In addition to conduplicatio as Kate's answer says, another relevant rhetorical technique is parallelism.
It can be a subtle difference to spot, and these techniques are by no means exclusive. Conduplicatio is about repeating a word or phrase - like how your example repeats the words "happy" and "change".
(As a side note, that seems to be the most general term, where the word may occur in any position - there are more specific terms depending on where in the clause the word/phrase appears. Anaphora is at the beginning, mesodiplosis in the middle, epistrophe at the end, and symploce for beginning and end.)
Parallelism is about repeating the structure - which as you noticed looks like "the speaker will repeat a short phrase, and change just one or two words". It's a very old technique, found anywhere from poetry to proverbs to professional speaking. In a speech, the speaker can build up energy with each repetition, culminating in that final point and driving it home.
For your example, the sentences all follow a similar structure:
If you want to be where _____, change _____.
Take care with grammar when using parallelism - the elements that you swap out need to agree grammatically (all adjectives, all infinitives, all adverbial clauses, etc.)
This site has some additional examples of parallelism (as well as other rhetorical devices) which I found helpful to understand how it's used.