The key problem
A classic cipher needs both sides to have the same secret key. But how do you hand it over safely? Diffie and Hellman showed that both sides can compute it from public values in a way an eavesdropper cannot work out.
The padlock in your browser
When you see https in the address, your browser has agreed encryption with the server through TLS and checked a certificate proving the server really belongs to that domain. Since 2015 Let's Encrypt has issued certificates for free, which is why most of the web is encrypted today.
The future
Quantum computers might one day break RSA. That is why post-quantum algorithms are being introduced, already supported by modern browsers and services such as Cloudflare.