Beamhook is a menu-bar app that grabs the keys with a CGEventTap and sends play/pause/next/prev to exactly one app you pick (or JS to drive browser tabs like Youtube in Safari and the Chromium browsers). It'll take the volume keys too if you want, with ⌘+volume falling through to system volume.
I was so very used to BeardedSpice — but last release was June 2017. MacMediaKeyForwarder seems to work but it forwards to Apple Music and Spotify only.
macOS 14+, GPL-3.0 — free to build yourself, €5 for a signed and notarized build, which helps to cover the Apple developer fee :-)