Moving from one key to another is know as either tonicization or modulation depending on context and length.
Tonicization happens only for a brief period of time before returning to the home key or another closely related key.
Modulation happens for the length of a formal section such as a phrase or period.
By and large the easiest way to move to a different key is through the circle of 4ths (also called the circle of 5ths depending on who you ask).
Let’s try this in practice: Suppose you are in the key of F major and would like to tonicize G major with only two chords to set up the G major chord, what chords should you use?
In the above video our root motion is: F – A – D – G
In the above video our root motion is: F – Eb – Ab- Db – Gb
We can even combine circle of fourths motion with chordal inversions to get really creative!