Whatever you do online, it boils down to two processes: sending requests and receiving responses. You may use anti-detection browsers that hide your online traces, like cookies or fingerprints, filter content, or hide your real IP, but leaks may occur in the process of sending information. To prevent it, encryption is necessary.
When your traffic is encrypted, it means that it's ciphered. Even if attackers manage to intercept such traffic, they cannot read and use it as it looks like a bunch of unreadable symbols. With encryption, your data is protected during the transfer process. That's especially important for tasks that require sending sensitive information, like credentials, for example, when you log in to your social media accounts.
Proxies can encrypt your traffic. However, not all proxies can be used for that purpose. It depends on the type of protocol a proxy server uses. Now the
HTTP(S) and SOCKS5 protocols are the most widely used. HTTPS is the one that encrypts your traffic. Pay attention to the fact that the HTTP protocol doesn't do so, even despite being widely used. The SOCKS5 protocol cannot encrypt traffic either. However, it can be used to set authentication, which can also benefit your safety. Authentication is necessary if you store any sensitive information on your servers and want to control who can access it.
The choice of a protocol depends on your tasks as well. HTTPS proxies are good when you have to deal with a large volume of data, for example, web scraping. Requests that you send have headers, and those headers carry additional information about what you're looking for. The HTTPS protocol then fetches the HTML code of pages and, using information from headers, customises search results, showing you only relevant ones. It saves you time as you don't have to look through unrelated options.
The SOCKS5 protocol is irreplaceable when you need speed, be it video streaming or P2P file sharing. That protocol uses another type of connection that allows you to transfer your data faster.