hey there, i was struggling with the same thing, until someone told me there is an "autoplay" category in the layouts section, so you can browse that and find specific songs or codes that can work for you, instead following a YouTube tutorial.
what worked for me was this:
<iframe width="0" height="0" src="https://www.youtube.com/embed/INSERT?autoplay=1&loop=1&playlist=INSERT" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" loading="lazy" data-ruffle-polyfilled="">
simply replace the "INSERT" with the link from YouTube of the song you wanna use. not the full link, though- just the screwed up line of letters and numbers because we already have the rest of the link, and be careful as to not accidently remove any symbols like ? or " while pasting.