I'd do the outside as well. You can put wide tape on the bricks to prevent foam marking them. The foam degrades in sunlight so outdoors, you have to protect it with plastic strip, or silicone sealant, or you can paint it when set.
But if you seal whatever gap you can see from indoors, it will block the draught. You can do that in winter.
The foam is not good for filling a cavity because it will drip down before it hardens. Your house might/should have a cavity filler at the window openings.
You could buy the gun and one can each of foam and cleaner, and try your hand for a start. The cleaner lasts a long time. It prevents foam going hard inside the gun.
But if you seal whatever gap you can see from indoors, it will block the draught. You can do that in winter.
The foam is not good for filling a cavity because it will drip down before it hardens. Your house might/should have a cavity filler at the window openings.
You could buy the gun and one can each of foam and cleaner, and try your hand for a start. The cleaner lasts a long time. It prevents foam going hard inside the gun.