You could try chewing some gum – a few years ago, psychologists showed that this reduced volunteers’ susceptibility to earworms, the theory being that chewing somehow hijacks the brain processes that are involved in ‘subvocalisations’ (singing or speaking in your head).
Another approach is to engage your mind with a task, such as a crossword or number puzzle, that is of just enough difficulty that your mind doesn’t start to wander. The idea is to use up your cognitive resources so that your brain doesn’t have the capacity to start playing its own music. Beware, though: if the task you take on is too easy or tricky, your mind will wander again, and the song will likely resume.
A final approach is to engage with the earworm – one theory suggests that earworms get stuck because they are mere snippets and our brains don’t like unfinished business. Listen to Baby Shark all the way through and, fingers crossed, you might find it goes away.