Like someone else below mentioned, MacOS has built in native PIP support for videos at the OS level. Browser-wise it only works in Safari though.
It's also a little hidden in YouTube's site because YouTube hijacks the first right-click. Try this if you have MacOS and want to see how it works with YouTube:
1. Open Safari
2. Go on YouTube
3. Go to any video
5. Right-click then right-click again immediately
6. Select "Enter picture in picture"
It should be available in the right-click menu in the native MacOS video player that most apps build on top of (unless said services hijack the right-click like YouTube). Works well with Netflix, Vimeo, VLC, you name it.
It's one of my favorite things.