Semantic Error: There are too many elements used in the program organization unit: '...' (current: ..., max. allowed: ...).
The POU mentioned in the error message contains too much code.
In ST, this includes statements, expressions and variable references.
In FBD/LD/SFC, this includes all graphical objects.
Double-clicking the error message opens the affected code. Shrink the POU, for example, by dividing it into several POUs.