Notifications
Settings checked on macOS 15.8
Hide previews when the Mac is locked
By default anyone walking past a locked Mac can read the start of your messages. This keeps the notification but hides its text until you unlock.
Show previewsWhen Unlocked
Turn most apps off
Below those settings is a list of every app that may notify you. Go through it once and switch off Allow notifications for everything that is not a person trying to reach you or a job you are waiting for.
My rule: messengers, calendar and reminders stay on. News, shops, tips, and “we have a new feature” apps go off. You will come back to this list each time you install something, and it takes ten seconds.