Ian Shepherd and his website have proven to be an excellent resource for myself and many others trying to navigate the dark art that is audio mastering.
Here is some of Ian's advice with regard to optimising loudness for online playback.
Master no louder than -9 LUFS short-term at the loudest moments
(with True Peaks no higher than -1)
If you follow this suggestion, you’ll be in great shape, in almost any genre. Your songs will be loud enough to sound “competitive”, whilst still retaining plenty of punch and dynamic contrast. They’ll stand shoulder to shoulder with anything else, on all the streaming platforms, and they won’t get turned down.(*)