The idea of the public and private key for security, it is to send and receive information to somebody and that somebody can verify also that the information came from the specific sender.
The concept is one way where it can be encrypted mathematically via a public key and decrypted by the recipients private key so it can only be received or read by the person with that specific private key that is linked to that specific public key. It can also be tracked by a public key to prove mathematically that this has come from the recipients private key.
There are 2 use cases of a public key
Digital signatures and encryption.