you can get neater results by covering the surroundings with cling film, taped down at the edges. It is easily removed once set.
Spraying water into the hole will make the foam expand and skin faster, helping you gauge how much more to use.
You can also spray water onto any excess that bulges out, this makes it skin over so it will not stick so easily to whatever it touches.
If you have a deep hole to fill, you can tape over it tightly, punch a hole in the tape just enough for the injector tube, and then block the hole. Because the foam cannot expand out through the hole, it will expand into the cavity, filling it better. I got good results filling gaps round windows by drilling through the frame or a batten fixed over the gap; the foam had to expand into the gap. When you see it bulging out of the next hole above, you can be fairly sure it is filled up to that level. Trimming off the wart of foam that gets through the hole is easy, once set. You can inject into each side in turn to give the other time to expand.