We have rat issues at times.
We have large stock of wood for burning, keep hens, at least four compost bins, feed the birds, hay in barn, live by a beck. The only solution is a very cold winter or traps and air rifle.
Peanut butter placed on a rat run while you hide in range the air rifle works if you keep at it for a couple of weeks.
If you get a real bad infestation particularly under sheds, in wood pile or hen houses, get a good ratting team in. A few mad blokes with terriers can an exciting spend a morning (pretty scary really). it works well though.
They’ll always be around just try and keep things tidy and do a bit of culling as required.