If OctoPrint tells you it can't install plugins or perform updates or such due to your OctoPrint instance not being connected to the internet, but you are 100% certain that it in fact is (e.g. you can ping external addresses when logged into your OctoPrint server), it could be that the host and IP you have configured for performing the connectivity check are the problem here.
OctoPrint by default uses Google's DNS server at
220.127.116.11 on port 53 for its connectivity check, which should usually be always reachable, but your network might be filtering access.
Go into Settings > Server > Connectivity check and test whether the server entered there is reachable. Try entering an alternative host. If push comes to shove you can also disable the connectivity check here, making OctoPrint just always assume that it can reach the internet.