Timeout error on terminal despite being able to browse the internet

I have fresh install of EndeavourOS in my laptop, I am connected to the Internet through WI-FI and I can browse as usual, but when I run commands like wget, ping or npm i <somepackage> I get timeout error, yet when running commands like yay -S <somepackage> or curl <someaddress> it seems to have no problems, does anyone know why this strange behavior and how to fix it?