According to the Lexico online dictionary there are many definitions of the word 'commonwealth'. They all do, however, have a relationship to the original 16th century phrase 'common wealth' from which the word was derived.
At first reading the word could be taken to be a proto-socialist or early Christian concept following the idea that the members of a community 'held all things in common' as the Acts of the Apostles says that the members of the early church did but, in practice, actual 'commonwealths' did not do this.
Arguably the oldest, and certainly one of the most famous political entities to be called a 'commonwealth' was the rule of England under Oliver Cromwell as Lord Protector following the Civil War and the execution of Charles I. The idea behind this naming was that the country was ruled for the benefit of all its citizens rather than for the benefit of the royal family but private property was certainly not abolished and small political groups such as The Levellers and The Diggers who attempted to bypass individual ownership of land were severely put down very soon after the end of the Civil War.
It is this concept of 'commonwealth' that seems to be behind the naming of Pennsylvania, Massachusetts, Virginia and Kentucky. The idea is that first the colony and later the state exists for the benefit of its citizens, not for the benefit of anyone else, such as a king.
Another major meaning of 'commonwealth' is that of a voluntary grouping of nation states with no one state being dominant. This is the concept behind the Commonwealth of Nations (originally the British Commonwealth) which was set up after WW2 to preserve and foster links between the UK and its former imperial colonies as they gained independence.
This meaning is also older than many people think. For instance the former alliance of Poland and Lithuania under a single elected king which existed from 1569 to 1793 is referred to in English as a 'commonwealth'
As I said there are other meanings of 'commonwealth' but most of them are variations on these two themes.