I struggled with this very problem OP and that lead me to build Focus Window (https://apps.apple.com/us/app/focus-window/id1444457097). Every single time I would work on a task I would be distracted by so many things including emails, websites, slack etc. To beat the distraction now I turn on Focus Window and that allows me to focus on a single application at a time, then I hide my desktop icons to "clear" my mind and lastly I play music that is soothing to the ear to remain calm and on task.