So you want to use internet on your PC using the phone as a modem. That's called tethering.
See the basic introduction in
The way to do it depends on the phone, of course. You forgot to tell.
And it depends on the OS of your PC or Mac also. You should tell it to use a connection to your phone as gateway, and not the Ethernet cable or the standard WiFi connection. You forgot to tell that also.
So it's impossible for anyone to tell more.