How to make your masters louder, even though streaming platforms don't allow it

Way back in the 1990s people thought it was a good idea to make CDs louder. But surely that was impossible? Digital audio peaks at 0 dBFS and you can't get any louder than that.
But you can make your master subjectively louder. It doesn't go above 0 dBFS because it can't, but it gets nearer to that level more of the time and so it sounds louder even though the peak level is the same.
Compression can do this, multi-band compression can do this, a brickwall limiter - yay! - can do this as much as you like. A bit of harmonic generation will help too. It all brings the average level closer to 0 dBFS more of the time.
So in the 1990s, mastering engineers used all of these methods, and developed and honed their skills, so that CDs got louder and louder and louder. This was known as the loudness war.
The cost of course was in worse audio quality and less dynamic range. The music became squashed and it just couldn't breathe.
And it seemed that the mastering engineers of the 1990s had forgotten that listeners could turn down the volume. So basically it was a pointless exercise and the only thing it achieved was to make CDs sound worse.
The problem was that loudness was a drug. Once mastering engineers, and the producers and A&R executives that paid their wages, got hooked on it, they couldn't detox.
It took a while for things to move on, but now that we mostly listen to music via streaming services such as Spotify and Apple Music, or watch music videos on YouTube, we are in safer hands.
What streaming services, and YouTube, realized fairly early on (not you SoundCloud!) was that listeners didn't like it that the volume changed from track to track according to how aggressive or how gentle the mastering was. One track could have fairly gentle mastering and the listener would adjust their volume for that. Then the next track would blow their brains out.
So streaming services developed technology to normalize the level of tracks so that they would all be the same loudness. That's simplifying the issue a little, but not too much.
The thing is though, that even though it is now almost universally recognized that competing for loudness is a bad thing, it's human nature to somehow feel that 'louder = better' and a track that is louder than other tracks will stand out.
So despite the best efforts of streaming services, it can still be an advantage if your track is louder than others.
How to make your master louder (this is what you came here for)
So how can you make your track louder if Spotify, Apple Music and the other streaming services, and YouTube, will just turn it down?
The answer is in how they measure loudness.
Loudness is measured in LUFS, which stands for Loudness Units relative to Full Scale. This uses an RMS measurement (consult your memory of school science or Wikipedia for detail on that) averaged over the full duration of the track.
It doesn't matter whether or not you are familiar with RMS because it's the 'averaged' bit that's important.
If your track is more or less the same level all the way through, a LUFS measurement can be taken and the track turned down as intended.
But what if parts of your track are quiet and parts are loud? OK, you have to sacrifice a period of quietness, but now the loud parts can be louder because of the averaging.
So maybe the best part of your song is in the first couple of minutes. If you have a quiet minute at the end then the first couple of minutes will be louder. Or your verses could be quieter and the choruses louder. Don't forget that what's important for you is that your song grabs the listener's attention so that they want to listen again and again, which gets you more money. If the best part of your song is louder than the previous track that the listener played, it will grab their attention better than if it was the same level.
There's another way to do this...
Suppose your track has distorted electric guitar chords thrashing all the way through without any break or pause. The LUFS measurement won't have any difficulty with that and the volume of your song will be turned down.
But suppose your arrangement is more 'stabby' so there are gaps between the notes. The peak level can be higher and the average level lower. So you can get higher peaks for the same amount of LUFS. Your song will sound louder to the listener. It's a bit of a shame that the quest for loudness affects your musical style, but technology has changed musical styles ever since music was invented so we probably don't need to care so much about that.
OK, I'm probably starting the loudness war all over again, but it's important that you know these techniques so you know what to avoid. Or not...