There are multiple definitions - click on the translation that matches your context.

zgodnie z prawem

wyrażenie

full

legally

adverb

Definitions of legally

English

done according to the law

The age of consent is the age at which you can legally have sex.