If you can’t be productive because there’s too much background noise in your brain, allow that background noise to speak up.
Find out what it’s saying.
As much as you can try to silence those other thoughts and “just get on with it”, your brain is not going to be working at full capacity.
Put the work aside and ask yourself what it is that’s going on in the back of your head to bring focus to the noise.
Clear it all out and then get back to work afterwards once you can assert full brain capacity again.