Put Up a Do Not Disturb Sign.
The sign needn’t be literal—telling people around you that you’re going to do some focused work is often enough.
This is especially helpful if you work from home. You may have kids, spouses or roommates that want to engage with you. Signaling to them when you’re trying to do focused work is a good way to prevent being interrupted in the middle of a session.