die Anlage
facility
A complex of buildings, equipment, or areas that serves a specific purpose.
Die neue Sportanlage verfügt über ein Schwimmbad und mehrere Tennisplätze.
The new sports facility has a swimming pool and several tennis courts.

facility / attachment / investment
Loading your saved state.
facility
A complex of buildings, equipment, or areas that serves a specific purpose.
Die neue Sportanlage verfügt über ein Schwimmbad und mehrere Tennisplätze.
The new sports facility has a swimming pool and several tennis courts.

'Die Anlage' is the noun related to the verb 'anlegen' (to lay out / to invest / to attach). The many meanings of the noun (e.g., a green space, a device, a financial investment) reflect the different meanings of the verb: to create something, invest, or attach something.
Die Gemeinde will einen neuen Park anlegen.
The municipality wants to lay out a new park.
Because 'Anlage' has many meanings, it is often used in compound nouns to make the meaning clearer. Examples are 'Parkanlage' (park grounds), 'Stereoanlage' (stereo system), or 'Geldanlage' (financial investment).
Meine alte Stereoanlage funktioniert nicht mehr richtig.
My old stereo system no longer works properly.
In the context of emails and letters, the fixed expression 'in der Anlage' (in the attachment) or 'als Anlage' (as an attachment) is used. It is a clear signal that a document is attached.
Wie besprochen sende ich Ihnen die Dokumente in der Anlage.
As discussed, I am sending you the documents in the attachment.
When the context is finance, you can recognize this meaning from words like 'Geld' (money), 'Kapital' (capital), 'Aktien' (stocks), 'Immobilien' (real estate), or adjectives like 'sicher' (safe) and 'riskant' (risky).
Aktien sind eine riskantere Anlage als ein Sparkonto.
Stocks are a riskier investment than a savings account.
This meaning can often be recognized from adjectives like 'öffentlich' (public), 'grün' (green), or 'gepflegt' (well maintained). It usually describes a park or a similar green space designed by people.
Die Kinder spielen in der öffentlichen Anlage hinter dem Haus.
The children are playing in the public park behind the house.
When 'Anlage' means an innate talent, it is often combined with the prepositions 'für' (for) or 'zu' (for / toward) and a noun. The typical construction is 'eine Anlage für/zu etwas haben' (to have an aptitude for something).
Er hat eine musikalische Anlage und lernt sehr schnell Instrumente.
He has musical aptitude and learns instruments very quickly.
system
'das System' and 'die Anlage' can both consist of several parts that work together. 'das System' is more general and can be technical, social, or conceptual. 'die Anlage' usually means something concrete: a technical device with several parts, or a larger site with buildings and facilities. The words can be confused especially in technical contexts. A 'Heizungsanlage' (heating system), for example, can be part of a technical system. If you mean the concrete device or facility, 'Anlage' is more precise. If you mean the whole interaction of parts, 'System' fits better.

Am Montag hat mein Kollege die neue Anlage in der Werkstatt getestet.
On Monday, my colleague tested the new system in the workshop.
Das System im Kurs speichert automatisch alle Nachrichten der Teilnehmer.
The system in the course automatically saves all messages from the participants.