I find that altering my hosts file manually and using the new focus feature on MacOS Monterey fits perfectly for my workflow.
I don’t have installed apps that distract me. It’s simply websites (Reddit being the worst in my case) and notifications.
I’m also using a separate user account for dev work and everyone at work knows I check slack and my emails twice a day and they can call me at any time. I’ve found it cuts down on distractions because it’s easy for people to ping me with small things but they feel a significant reason is needed for calls.
Focus on iOS has all notifications muted in my work profile but allows calls from my co-workers and partner.