Like others have expressed here, I have mixed views.
On the one hand, living in the city means you have a smaller human footprint on the environment: because everything that one could need is clustered close together, I can potentially walk or bicycle there, or take public transport, or drive a relatively short distance, which means I emit less carbon than I would living in the countryside, where everything is spaced widely apart. Hospitals, government buildings and other institutions can be easily reached this way without the cost of driving as it would be in the countryside. Living in a smaller space (flat or townhouse) means that I, along with my neighbours, take up less land and less space than if we all each had smallholdings. Cities also need much less infrastructure to be laid (water, electricity, internet, etc) connecting more people for less cost and comparatively less impact per person.
So while city living has its not insignificant environmental benefits, it also has its environmental costs. As we all know, urbanisation destroys the natural habitat in which it takes place; it concentrates pollution to potentially hazardous levels (concentrations of natural minerals far above their baseline ppm presence, toxic chemicals from all the products and pharmaceuticals we use, etc), and it puts people in super close contact (re: pandemics and crime).
Living in cities also tends to isolate people and children from nature, and this is a critical thing when we need our children to be the future custodians of nature. Countless studies have shown the psychological benefits of being in nature - better mental health, improved focus, lower stress, etc
As someone living in a city surrounded by mountains covered with natural vegetation, I benefit from both: the benefits that city life has to offer, and the immersion in nature that every human needs.
However, the flipside is that by wanting to live close to nature, we ironically help contribute to the damage and destruction of that natural environment! Here in my city, developments have grown like weeds all over the place because people keep moving here. As more people move to areas like this, more developments and more houses get built over the natural habitat that attracts the people in the first place. Given enough time, there will be little natural habitat, and what habitat there is will be heavily fragmented. Studies have shown that heavily fragmented habitat lose the ability to support many species and their overall biodiversity becomes simplified over time.
I think we need a shift in culture and policy.
We need to keep cities dense (not spread out = suburban hell and urban decay) with proper public infrastructure and public transport, and have green spaces available inside cities (not built over). In addition, hard limits will need to be placed on the development of highly-sought after property in sensitive and biodiverse habitats. Have programs in place to empower people who want to garden to contribute to the green urban spaces. Have programs to expose people and children to natural areas on a regular basis.
So while I would love to live close to wild areas, I also recognise the fact that wildlife such as elephants, lions, and wolves are not compatible with higher human settlement and need their wild habitat. If that means I live in a city with limited access to wild areas and such wild areas are adequately protected, so be it. I can be a transient visitor to such wild areas and keep my overall human impact to that of the city.