Steam and pacman failed to connect but some other applications are file

For best practice you should follow these threads for helping to maintain your System

and

Since I have no Idea what was removed you could start by posting your pacman.log
To learn how to include log files check this out
https://discovery.endeavouros.com/forum-log-tool-options/how-to-include-systemlogs-in-your-post/2021/03/

I’m not sure if it would be better to try and reinstall the things you removed you may need or to just do a fresh install and stop running commands you have no Idea of what they do just blindly.

you may need to rebuild your keys as well from what It appears
https://discovery.endeavouros.com/signature-and-keyring/pacman-keyring-issues/2021/03/