Sticky Navbar not fixed

I followed a W3-Tutorial and want a fixed navbar. Unfortunately, the JS does not show any effects. I have already tried a higher z-index and position:sticky, but that didn’t help either. window….