While pedaling the bike, locate the cable leading to your rear derailleur and pull on it gently. Note how this shifts the chain by moving the derailleur. All a derailleur does is align the chain with the sprockets on the cassette.
Note that if the bike is upside-down, you need to turn the barrel away from the direction you want the chain to move. [3] X Research source
Loosening the barrel also helps if your chain is jumping two gears at once when heading to the larger sprockets. [5] X Research source
Turn the barrel 2-3 turns to the right to full loosen it, then start over. If the cable was too tense when you started, it could need to be re-adjusted from scratch. Check for bent gears or derailleur arms. If this didn’t work, there is likely a larger issue with the bike. [6] X Research source
If you keep slipping a chain, check your limit screws. If you can’t shift into the highest or lowest gear, check limit screws. If your chain is grinding against your frame, check limit screws. [7] X Research source