How modern messengers encryption keys can't be hacked
Aren't they delievering by the network the same as the encypted messages?


No. At least not in the plain. 


  What doing it end-to-end encrypted?


Try to search for the key agreement protocol (e. g. Diffie-Hellman ) and asymmetric encryption (e.g. RSA ). 

The "asymmetric" encryption allows sending encrypted and signed messages without sharing the private (secret) key. 

Very simplistically explained - each actor creates a key pair (with a public and private part) and the actors will exchange their public key. That allows both actors to securely create a shared secret even on an unsecure channel