Mixes have definitely gotten louder in recent years. Of course there is no way that digital audio can go higher in level than full scale (0 dBFS), but the closer and more often a signal approaches 0 dBFS, then the louder it will sound. The tools for this are compression, limiting, very careful clipping, and of course the multi-band compressor.
The reason why mixes have gotten louder is firstly because the equipment and software to make them so has become more common and more affordable, and more people know about it. The second is that mixes compete with each other for loudness.
Take radio for example. Within the terms of a radio broadcaster's licence to transmit, they have to agree to a certain transmission power level. There is nothing that can be done in the studio to make a signal any higher in level than that. This is the radio station's equivalent of 0dBFS. But if mixes can be made subjectively louder in the studio, it follows that whoever's mix is subjectively the loudest will sound loudest on air. Other mixes will be quieter in comparison. And loudness gets attention.
The same applies in clubs. The level of a PA system is set to comply with the limits of the equipment, and often decibel limits applied by law or property rental agreements. So if a mix can sound subjectively louder within the same peak levels, it will be at an advantage compared to mixes that are not subjectively so loud.
But the downside to this is that all the processes that make a mix loud downgrade the audio quality. So if you don't want to listen so loud, it won't sound so good.
There is no area where this is more significant than music for TV and film use. If you are tempted to 'master' your mixes and 'optimize' them for loudness, then you are damaging your audio quality to no good purpose. Your music is probably only going to be background anyway. For a title theme, then the post production house will optimize the levels as it thinks necessary.
Although mastering is a straightforward process to apply, it is impossible to 'unmaster' a track. Best advice is to make a mix without any compression or limiting on the stereo mix – maybe some EQ if you wish. Then make a mastered version if you feel you need to. This way you always have a clean, unmastered version of the mix that is versatile and can be applied to any kind of use.