That's correct: an ID will only ever refer to one element on the page, so using it for multiple elements is always incorrect.
There's a simple solution for you here. Wrap the NOW PLAYING and the button (both) in a container element, then when the button is clicked, have it locate the container and then find the desired element to copy inside of it.
IIRC:
<div class="copy-container">
<div class="copy-target">NOW PLAYING: Something</div>
<button class="copy-button">COPY</button>
</div>
<script>
document
.querySelectorAll(".copy-container")
.forEach(container => {
const target = container.querySelector(".copy-target");
const button = container.querySelector("btn.copy-button");
button.addEventListener("click", () => {
copyToClipboard(target);
});
});
</script>
And please don't implement clipboard functions like that - use the actual Clipboard API instead.