If you're looking for something free and lightweight, check out Admiral (getadmiral.com) — they have a free tier specifically for anti-adblock detection. It shows a polite message to users with adblockers asking them to whitelist, and it recovers a decent chunk of revenue.
Another option is BlockAdBlock on GitHub — it's open source and you can customize the detection logic. The downside is you need to maintain it yourself as adblockers update their filters.
For Adsterra specifically, they actually have their own anti-adblock solution built in if you're using their ad formats. Check your Adsterra dashboard under the anti-adblock section — it might save you from needing a third-party script.
One tip: instead of blocking adblock users completely, consider showing them a soft prompt. Hard blocks drive users away. A simple "We notice you're using an adblocker — our content is free because of ads" message converts better than a wall.