To prevent edge from writing YouTube videos to disk, go to ~/Library/Caches/Microsoft Edge/Default/ , select the 'Cache' folder and click Get Info, and under 'Sharing & Permissions' set your admin/user account to Read only, so that it says 'You can only read'.
I'm attaching a screenshot of some of the extensions I have in Edge, most importantly Tab Discarder. You set this extension to discard your background open tabs when you're not using them - this unloads the websites completely and completely frees memory, but keeps them open as a tab. Therefore you could have 100 tabs open like I do right now, but only have 5 tabs loaded in memory at all times - no caching and no excessive swap writes.
You can customise the settings of the extension to your choosing. I'm attaching the way I've set my settings which work best for me, but you may want different settings e.g. to have more tabs open at once before discarding.
Lastly in edge, type edge://flags in the search bar, and where it says 'Search flags' search:
Partial swap - Disable
AppCache web API - Disable
Heavy Ad Intervention - Enable
Back-forward Cache - Disable
You can look through the flags and enable any other features which might interest you, e.g. I've enabled parallel downloading for faster downloads, and Tab Hover Cards for tab previews when I mouse over their tab names.
That's essentially all I've done in terms of optimising Edge, you could also try the built in Sleeping Tabs in settings with a timer of your choice, however this will not discard tabs so the memory reduction will only be slight. In contrast my method is best if you want very minimal SSD writes even with 500 tabs 'open'. And if you're going to use Tab Discarder I recommend completely turning off sleeping tabs.
Right now I'm at 21.61GB written at 23:45 hours of uptime, or 0.9GB written per hour.