How do you disable opening Safari on macOS?
Solution 1:
You could perhaps configure the Parental Controls to prevent browsing by limiting the websites you can view. (Big Sur may have slightly improved controls than Catalina.)
https://support.apple.com/en-gb/guide/mac-help/mchl8490d51e/11.0/mac/11.0
Though of course, there's nothing to stop you from turning the controls off.
Ultimately, I would suggest that the best solution is a non-technical one.