die Allgemeinheit
public
The entirety of people in a society; the general public.
Der neue Stadtpark ist für die Allgemeinheit frei zugänglich.
The new city park is freely accessible to the public.

public / generality
Loading your saved state.
public
The entirety of people in a society; the general public.
Der neue Stadtpark ist für die Allgemeinheit frei zugänglich.
The new city park is freely accessible to the public.

The word is made up of the adjective 'allgemein' (general) and the ending '-heit'. The ending '-heit' forms feminine nouns that describe a quality or state.
Die Sicherheit der Allgemeinheit hat oberste Priorität.
The safety of the public has top priority.
The meaning can be recognized from context: If the word refers to people or society, it means 'die Öffentlichkeit' (the public). If it refers to the quality of a statement or rule, it means 'die Generalität' (generality).
Diese Regelung dient dem Schutz der Allgemeinheit.
This regulation serves to protect the public.
When 'Allgemeinheit' means the public, it is often used with the preposition 'für' (for). Typical phrases are 'für die Allgemeinheit zugänglich sein' (to be accessible to the public) or 'im Interesse der Allgemeinheit handeln' (to act in the public interest).
Der Strand ist für die Allgemeinheit geöffnet.
The beach is open to the public.
In the meaning of 'Generality', 'Allgemeinheit' is often used with a genitive that specifies what is general. Examples are 'die Allgemeinheit einer Regel' (the generality of a rule) or 'die Allgemeinheit einer Behauptung' (the generality of a claim).
Die Allgemeinheit des Gesetzes sorgt für viele Diskussionen.
The generality of the law is causing many discussions.
people
'die Leute' and 'die Allgemeinheit' can both mean people in general. 'die Leute' is normal in everyday language and can mean an indefinite number of people or also a specific group. 'die Allgemeinheit' sounds more factual and means the people of a society or the public as a whole. The word fits, for example, when something affects everyone or is accessible to everyone. Learners may confuse the words because neither refers to a single person. The difference is mainly the context: 'Leute' fits in conversation, while 'Allgemeinheit' is more for formal or factual situations.

Der neue Park ist für die Allgemeinheit geöffnet.
The new park is open to the public.
Am Morgen hat meine Kollegin viele Leute nach dem Weg gefragt.
In the morning, my colleague asked many people for directions.