Keep them on the baking sheet or gently transfer them back to a baking sheet if you moved them to a cooling rack.
a batch of underbaked cookies
Preheat the oven to the temperature the recipe calls for.
Bake the cookies for a few more minutes until they are done. I usually check them every minute.
Keep an eye on them, or use a kitchen timer. Cookies go from underbaked to overbaked really quickly.
If Your Cookies Have Cooled Off
Preheat the oven to 300° F and transfer the cookies to a baking sheet. This temperature might be lower than what the recipe calls for, but at this point, the goal is to bake the center and reduce the moisture in the cookie without burning the edges.
Bake the cookies for a few more minutes until they are done. I usually check them every minute.
If they have been cooled and rebaked, the texture of the cookies might change. However, they will still be delicious!
Notes
See your original recipe for nutrition information.
You will still have soft cookies if they don't cool too much before going back in the oven. If they have cooled significantly, they may be crunchier, but still delicious!
If rebaking cooled cookies, lower the oven to 300°F to finish the centers and reduce moisture without overbrowning the edges.
Depending on how cool the cookies were before the second bake, the second bake might change their texture, but they will still be totally edible.
Always let your oven preheat completely before baking so the cookies start cooking at the correct temperature.
During the initial bake, turn the baking sheet halfway through baking for more even heat distribution.