It’s not as gross as it sounds: It turns out, the acids in many foods soften tooth enamel, making your teeth vulnerable to damage from brushing.
So, wait at least an hour. By then, the acids will have cleared and the enamel will have re-hardened. Also, you can’t speed the process, rinsing your mouth with water won’t make a difference. So just wait.