In case of YouTube you can actually dump the link into VLC, and it will happily buffer the whole video while paused. This probably works with other sites, but I have only tested YouTube.
Alternatively you can of course just download the video with yt-dlp, and then play it locally