You don’t have to pedal at 90 rpm – but it helps. The ‘perfect cadence’ will vary between riders, but between 80-90 rpm is usually considered the right ballpark.
Short bursts of quick pedalling will help you to reach this average. ‘Spin up’ drills are short bursts, where you start pedalling a low gear (on a flat road) fast, and then keep increasing the cadence until you’re going as fast as you possibly can without bobbing up and down out of the saddle. These can be repeated 3-5 times at the start of a ride, with 60 second rests between.
A more structured and endurance based approach is to increase cadence over minute intervals.
For example, after a warm up, start your sessions with 60 seconds at 90 rpm, immediately followed by 60 seconds at 95 rpm, 60 seconds at 100 rpm, 60 seconds at 105 rpm, 60 seconds at 110 rpm. The effort gets harder until 5 minutes is up, when you can return to normal cadence. If this is too hard, start at 80, if it’s to easy, start at 95.