At work, it is possible you need to access a Proxy server to get through your companies firewall.
First, are you using the corporate network?
Does your company have a corporate firewall?
Do you have a Proxy set in
System Preferences -> Network -> WiFi interface on the left -> Advanced -> Proxies
If you need a Proxy when at work, but you also take the Mac home and of course do not need a proxy, then you may also want to know that you can setup multiple locations, each of which can have their own proxy or no proxy settings. System Preferences -> Network -> Location. By default location is "Automatic", but you can click on that and select the gear icon, then duplicate your existing location, give it a new name and then configure it with any location specify changes you need. Once you have multiple locations, you can use the Apple menu -> Locations to quickly change your network location.
Side note. The funny thing is the guy in the office across from me is also named Naresh, and just go his first company issued (and configured) 13" Macbook Pro.
Of course I know you are not my Naresh, as he has been a Mac user for years, and has used his own personal Mac at work. Besides our company issues 2017 13" Macbook Pros with ONLY 2 Thunderbold-3 USB-C ports. You are really lucky your company got the 4 port versions. We struggle trying to get the right combination of adapters that will allow us to drive 2 monitors, an Ethernet port, some USB3 ports and still provide power. 4 ports would make that so much easier.