The cable itself does not provide anything, except for a connection to whatever it's plugged into on the other end.
The fact you can connect to the router doesn't necessarily mean that the router itself has a connection to the internet.
So you need to do more investigation.
Can the router itself connect to the internet? There's usually a "Test Internet Connection" button on the router's configuration interface. If this works you should see that the router can access the internet, and do a test of your internet speed. If that doesn't work then the router doesn't have a connection to the internet. So even though your computer can access the router, the router can't get to the internet, so neither can your computer (nor anything else connected to the router.)
Are you using a separate router and modem? Do the lights on the modem show it's connected to the internet? If not, then try unplugging the modem, wait a few seconds, then plug the modem back in. Wait for the lights to start flashing green. If the internet light doesn't eventually come up as green after a few minutes then call your internet provider for tech support.
If the router and modem are working properly and can access the internet, then check out the other settings on the router. Are there any firewall rules enabled? Perhaps you unknowingly turned on the firewall or access rules that block the IP address of your computer from connecting. Make sure all those are turned off.