Search for the word under the cursor, and only whole words.
4 drills
Jump with *: Jump to the next whole-word use of the word under the cursor.
Look back with #: Jump back to the target: an earlier whole-word use of the word under the cursor.
Partial matches with g*: Jump to the target, a longer word that contains the word under the cursor.
Rename with * and :s//: Rename the variable under the cursor everywhere, without touching longer words that contain it. Use *, then :s with an empty pattern.