There is a good reason the most common troubleshooting step for a tech problem is to restart the device: it often works. Why might that be? The explanation is actually pretty simple. Software is default blind.
Default blind means that software has no clue what it's doing.
Running programs charge forward recklessly. Software has no visibility into itself or anything on the system unless it has been explicitly programmed to look. There is no default level of awareness, everything must be explicitly checked. If a program doesn't check for an error condition, the program might behave incorrectly. If the program checks for ten error conditions and you hit an unexpected eleventh: trouble!
Hundreds of programs are involved in something as pedestrian as listening to music with wireless headphones. These programs run best in an unsullied environment. Nothing to metaphorically trip over.
The perfect program doesn't exist. So as your music player runs, bugs occur. Big bugs are easy to spot and fix. It's the little insidious ones that get shipped to customers. These little bugs don't stop your music listening directly. Rather these bugs mess up the computing environment. They leave a file open; they allocate a little too much memory; they fill a queue somewhere faster than it's getting drained.
Eventually, if enough buggy programs mess up the computing environment enough, an essential program in your music-listening chain will fail. This is where restarting the device comes in.
Restarting the device wipes the slate clean, the programs we want to run are now more likely to be running in the clean "happy path" environment they were programmed to run in.
The program you're directly running might not be to blame. A good programmer can only be so defensive. If another program starts consuming massive compute resources in the background, the user might blame the foreground application even though it's innocent. Restarting the computer stops the bad background application "fixing" the perceived problem with the foreground application.
Software often seems clever because of how powerful it is. But even in the era of LLMs these are not thinking machines: they're explicit instruction machines. Unexpected state accrues on a running system like dust. Restarting the machine clears the figurative dust, resetting the compute environment to what the program is expecting.
Oh and don't forget to get a good night's restart for the computer user.