It is available to all customers[1] with a supported device (plan doesn't matter, but I suspect prepaid customers are more likely to have cheaper, unsupported devices).
Hmmm. Interesting.. When I was on postpaid, I used to get caller ID with something like "Scam Likely", but since switching to pre-paid, I don't get those anymore. Looking at their page about it, it only mentions post-paid.
https://www.t-mobile.com/support/plans-features/scam-id-and-...
Here's also a thread about it on their site.
https://community.t-mobile.com/thread/146574