Only if the sound is coming from the windows or the doors. If it is through the walls, then you can't.
krisp.ai + good noise cancellation headphones works well in these scenarios.
https://ref.krisp.ai/u/ub695d43d7 <- I have a referral which should give you a month of pro if you haven't had a chance to try it as yet.
I have my own kids screaming through the day and I often ask my co-workers if they can hear them and they can't. So this works quite well.