When YouTube audio is out of sync, check whether it happens on every video or only one. If every video lags, the cause is on your side: the browser, an extension, graphics acceleration, the app or Bluetooth headphones. If only one video is out of sync, on every device, the uploaded file itself was out of step, and only the person who uploaded it can fix it by uploading a corrected file.
This page covers both. For viewers, the steps below go from the quickest fix to the most thorough. For creators, YouTube’s own help says to make the audio and video tracks the same length and edit them before uploading; the tool above does that for the timing itself: open your video, press Detect automatically or line up a clap, nudge the sound Earlier or Later, and Export video with the picture untouched.