A lot depends on your skill, particularly with a springer

If you can accurately shoot a springer that would be the obvious answer because they're a self contained unit & the cheapest option.

A pcp will cost more, you'll also need a pump to fill it, but the main benefit is they have no recoil bounce so are easy to shoot in comparison.

Your best bet might be a CO2 powered rifle which will be cheaper to buy but will cost a bit more to use buying CO2 canisters, but like the pcp there's no recoil bounce.

You will need a Rifle NOT A PISTOL & you want a small scope rather than "iron sights", in .22 rather than .177.
Where possible shoot down from an upstairs window so the ground is your backstop & practice until you can hit a 10p size target every time only then consider shooting living creatures, & shoot them in the head.

Rats wise up very quickly & you might need to put out bait to make them stop to take the shot.