Using Google / YouTube domains as an example, for allowing sources that issue cookies and javascripts:
You’ll figure out, how to do that for other websites.
In general, I run Brave Browser (MacOS) in “Private Browsing Only” mode. Shields UP; aggressive/strong settings for Trackers & Ads, and for Fingerprinting; but I allow cookies (but block 3rd party cookies).
So, I had to become familiar with especially the javascript setting(s) mentioned above.
And I have Brave Browser set up to dump all cookies, clear cache, web history, etc, every time I Quit (“Exit”) Brave Browser . . . for privacy and security reasons.
Some instrumentation, to help you learn and observe what is happening: