In the desktop web version of YouTube, if you close the browser while you are watching a video, you will then see this the next time you visit YouTube:
This is a typical example of “dark pattern” i.e. a feature that is useful to the website maker (YouTube wants you to be hooked on watching videos to maximise their ads revenue) but hostile to the user (you closed the browser tab because you didn’t want to watch the rest of that video, but you get force-fed that same video once again).
Thankfully, the browser plugin uBlock Origin comes to the rescue. Go to uBlock Origin’s Dashboard, click on the tab “My Filters”, and paste the following:
Now, when you visit YouTube, the hostile feature is gone.
Or even better, start using a video service that is not as user-hostile as YouTube, for example PeerTube or Piped.
Edit 8 March 2022: in an older version of this post, I was suggesting Odysee as a possible YouTube alternative. I no longer suggest using Odysee, due to their very invasive notification policy, where you are reminded to “verify” your account (by sharing your credit card data – or other bits of personal info). If you don’t do that – or are unable to, since the verification process is really buggy – you will get notifications every few minutes, and to add insult to injury, you can’t dismiss those.
This is a typical case of “nagware” i.e. a piece of software that is so annoying to use in its current form, that you are pushed to do something – e.g. sharing your credit card data – that you wouldn’t normally do. The best way I know to avoid nagware on Odysee is using this uBlock Origin filter: