Small gap underneath garage's concrete slab on one side that needs to be filled
With the small area and it being on the edge just pack it with dirt. We fill in voids under sidewalks and with sand   Water works well to help the sand flow and provides a solid base where there was a void. , in your case get some dirt and a metal “post tamp” and pack the dirt in by hand it won’t take long then back fill. 
On the edge with nothing to trap the foam it will expand and just make a mess, yes I have lifted slabs yes I have used poly and grout. 
What is a post tamp, a steel bar that has a round flat end and a flat rectangular blade on the other end used for packing dirt in small areas like you have.