YouTube blocks playback when a page is opened straight from disk. In this folder run python -m http.server 8000, then open http://localhost:8000/index.html.
This browser is blocking storage, so playlists will be lost when you close it. Use a normal (not private) window and allow site data.