encryption means jumbling a readable message into a set of meaningless characters so a third party can't read the message. In order to read the message the receiver had to unjumble the message by a secret key.
On standard encryption, receiver should know the secret key. In order to do that, the sender should send secret key to the receiver in some point.
So in order to reduce that vulnerability end to end encryption is using.
On end to end encryption, sender has two secret keys. and the receiver also has two secret keys.
Those are called public and private keys.
The sender has sender's private and sender's public key.
the receiver has receiver's public and receiver's private key.
Public keys can be shared but private key is not shared.
So in order to send the message, sender get the receiver's public key and encrypt the message from it. From end to end encryption method, unjumbling can be done from the receiver's private key which is known only by the receiver.
So the sender send the message as a jumbled message. it go to the server as a jumble message. and it sent to the receiver as jumbled message. It can be unjumbled and turn in to a meaningful message can be made only from the receiver's application.