I work best in an environment that has a constant background noise like a 20" box fan (good source of the right tone of "pink" noise for me) to drown out any spurious background noise and voices. In the office, I actually dial up a YouTube of such a fan playing for 8 hours and wear a headset. I also like a darker environment, which I can't get in the office. Sunglasses don't seem to provide the same effect because they also change the way the screen looks. Might try wearing a baseball cap to help cut the light from overhead.
A private office would probably help with the noise and certainly the lighting but it won't help with the electronic drive-by shootings (email, Skype, AND Teams!!!), all of which I'm required to respond to almost immediately because I'm the only DBA for the company. I wish that some people would just come to my desk instead of trying to have lengthy conversations electronically. They take 10 times longer instead of talking face to face and then summarizing what was said or needs to be done in an email later. Having a private office would probably make the electronic drive-by shootings even worse especially since I'd keep the door closed and the lights too low for most people's comfort.
At one company I worked at, this one guy would send me a ton of PMs and Emails. The idiot sat right next to me and could see me over the short divider between us. I finally got to the point where I told him I wasn't going to answer his emails and that I blocked him from my PM system. We got a whole lot more done both apart and together that way.
I'd love to have time to really focus on stuff especially when I'm writing PoP code, testing it, and getting it ready for production. That's why I've offset my hours. That's why I usually from home until noon and tell people to call me if there's an emergency. It's "focus" time.