You want to fill them as soon as they've cooled, so that they won't melt the filling, but they still taste fresh from the oven and aren't stale.