Start by cutting down your foam so it fits securely inside the window box. You want a snug fit so nothing wiggles when you start inserting stems.
Optional: Glue the foam down or use wood skewers to anchor if placing in windy areas.
If you’re planning to reuse the container for another season, don’t glue your foam. That way, it’s easy to swap out the arrangement for fall or Christmas.