Chose which player is activated by headphones play/pause buttons I have 3 pairs of Bluetooth headphones:

Sony WH-1000xm4
Jabra Elite Active 65t
Cardo PacTack bold (motorcycle communicator, works as Bluetooth headset)

On my Pixel 5 I have 2 sound players installed:

YouTube Music (for music)
Smart AudioBook Player (for audiobooks)

Whenever I am listening to music using YouTube music and press the pause and then resume button on any of my Bluetooth devices, it switches to playing audiobooks in Smart Player! This is very annoying, especially on a motorcycle where I need to stop to be able to unlock my screen to switch back to YouTube!
If there is a way to set up which player is activated when a play button on Bluetooth headphones is pressed? Or at least disable some players from being ever activated by a button?
Bluetooth connect &amp; Play from Play Store meets your needs. App description says

This app is designed to tie the Bluetooth connect event to playing the music player of your choice.  Unlike other auto-play options, this allows you to select the specific player that should be used.

I have Jabra Elite 65T (not active) and it worked by letting me choose which music player to be activated on key press. I didn't try with your audio book player, though, but I guess it should work.
Bonus point is that it has zero trackers as per Exodus