Vicky a slow rising foam should be used to fill any gaps. There is foam products that you can purchase at the big box stores that tell you that they are just for that use. Windows and doors. Do not use the normal product that is simply spray foam. This will expand so much that it will warp the window frame and mess with its operation. Use a little at a time until you get the hang of just how much it expands. Once it drys in a few hours, use a steak knife and cut the extra that sticks out past the wall with it.
Woodbridge you helped me with the same type of problem. You suggested the Great Stuff in a blue can. Will this work for Vicky, too. I posted the finished job on hometalk.
I had a 3/8" gap below my window. Thank you again.
Thank you so much for the advice. I will explore these great options.