That depends on the filling. For these lemon cookies, or for traditional jam thumbprints, fill before baking. If you're making thumb cookies filled with caramel or chocolate, you'd fill them after they cool.