Most of the time the answer is: they either have a license, they are using music provided by the platform, or they are taking the risk and dealing with claims later. Seeing another creator use a song does not mean it is automatically legal for everyone else to use it.
On YouTube, copyrighted music can trigger Content ID. Sometimes the video stays up but the owner takes the revenue, sometimes it is blocked in certain countries, and sometimes you can get a strike. Big creators may also be using licensed tracks, label-approved promos, or music that is cleared through Shorts/YouTube's audio library.
The safest path is to use YouTube Audio Library, properly licensed royalty-free music, or music where the creator clearly gives commercial usage rights. Fair use is much narrower than people think, especially if the music is just there to make the video better rather than being discussed or transformed.