die Umgebung
surroundings
The area or landscape that surrounds a particular place.
Wir machten einen Spaziergang in der ländlichen Umgebung der Stadt.
We took a walk in the rural surroundings of the city.

surroundings / environment
Loading your saved state.
surroundings
The area or landscape that surrounds a particular place.
Wir machten einen Spaziergang in der ländlichen Umgebung der Stadt.
We took a walk in the rural surroundings of the city.

The word is derived from the verb 'umgeben' (to surround), which means 'to be around something.' The prefix 'um-' signals what is surrounding, so 'Umgebung' (surroundings/environment) is literally what is around you.
Das Haus ist von einem schönen Garten umgeben.
The house is surrounded by a beautiful garden.
When referring to the landscape, 'Umgebung' (surroundings) is often combined with adjectives such as 'näher' (nearby), 'weiter' (wider/farther), 'schön' (beautiful), or 'ländlich' (rural). A typical verb is 'die Umgebung erkunden' (to explore the surroundings).
Am Wochenende erkunden wir gerne die nähere Umgebung mit dem Fahrrad.
On weekends, we like to explore the nearby surroundings by bike.
In a social context, 'Umgebung' (environment) describes a person's surroundings or environment. Common combinations are 'die soziale Umgebung' (the social environment), 'die familiäre Umgebung' (the family environment), or 'sich an eine neue Umgebung gewöhnen' (to get used to a new environment).
Für Kinder ist eine stabile familiäre Umgebung sehr wichtig.
A stable family environment is very important for children.
You can recognize the technical meaning immediately from the context. It is used almost only in IT, often in combinations such as 'Test-Umgebung' (test environment), 'Produktiv-Umgebung' (production environment), or in connection with 'Software' and 'System'.
Bevor die Software veröffentlicht wird, muss sie in der Test-Umgebung geprüft werden.
Before the software is released, it must be tested in the test environment.
closeness / proximity
'die Nähe' and 'die Umgebung' can both refer to an area around a place. However, 'die Nähe' mainly emphasizes a short distance: something is not far away. 'die Umgebung' more often means the area around a place, that is, the surroundings, or also the social environment. That is why you naturally say 'in der Nähe vom Bahnhof' (near the train station) when you mean the distance. 'die Umgebung' fits better when you are talking about the neighborhood, the landscape, or the people around a place. They can be confused when you want to say that something is somewhere in the area. In that case, 'Nähe' is more precise for short distance, while 'Umgebung' is more general for the surroundings or environment.

Die Umgebung des Sees ist ruhig und gut für Spaziergänge.
The surroundings of the lake are quiet and good for walks.
Die Apotheke ist in der Nähe, also bin ich in fünf Minuten dort.
The pharmacy is nearby, so I'll be there in five minutes.