I've always been enamored of courtyards. There is a feeling of safety and privacy while yet being in a little piece of nature, or open to the sky. I've visited them all over the world and it seems like every culture has used this ancient archetype. Some climates are more conducive to courtyard design than others, though.
In Spain, we stayed at a Moorish hotel with a central courtyard and fountain. Courtyards in hot countries like Spain or the Middle East often used courtyards to collect water for household use. Also cool air would stratify in the courtyard and help cool off the house at night.
In Finland we visited Alvar Aalto's Town Hall at Saynatsalo, which is designed around a grassed courtyard. Finland gets a lot of snow, so I had thought this was one country where courtyards would not be appropriate. However, Aalto loved Japanese architecture and I believe he was influenced by the courtyards he saw there. He also designed his own lake house with a central courtyard.
And in Japan, my favorite country, courtyards are a part of the vernacular. Here is one of thousands of photographs I took in Japan during an architectural tour in September 2019.
In our hot southern climate, courtyards have to be designed with great care, or they will overheat, or trap heat. It's not something to take lightly. When I design a courtyard, I make sure there will be cross ventilation or the ability to have enough breezes to flush out the hot air when needed.