I did speed test i got like 39ms and download and upload rate were in the 30Mbs
However when im gonna connect to a battlefield bad company 2 server it shows up at 60-80 ping
Once i get in it goes up to like 300-500 which is way too laggy
Do my specs count
Athlon II x3
2 gb ram
Motherboard biostart 870+
If you use the online ping test, it select the best server for you, that is the closest server to your location which host the test. This will show you your best latency. However, when you play a game, your server can be in another state or even in Europe and you don't get your minimum latency. Try changing your connection profile to low latency in your modem and in your ISP's account will improve latency. Also, try to use the server close to you to host a game, usually your ISP's own server.
The amount of time a ping takes depends on the route that the signal is taking from your machine to the server and back - so the reason it is high could be anywhere along that route and it only takes one slow link in the route to slow the connection and there is not many things you can do to control it (the route is controlled by your ISP and the servers ISP) -- the only control you have is in selecting the server you connect to and sometimes the list of available servers just does not have a good location for you to connect to.