I've tried this (very recent) Sharepoint 2013 How to hide Gear Button for non admins without change masterpage and it worked in Classic Experience, but the gear icon is still displayed in the Modern Experience.
I also tried this Hide the gear icon (Site Actions) for all users except Admin and many other solutions online. None of them work.
I'm quite happy using CSS just to hide it and the code from first link works, but for Classic Experience only. I need it working in the Modern Experience.
I use SharePoint Chrome extension to link .js and .css files to SharePoint sites, but Modern Experience sites seem to ignore them.
Why oh why is Site Contents available to all users is beyond me...
To be more specific, I do not want anybody to see this list: