P2SH (Pay-to-Script-Hash) templates were introduced with BIP-16. BIP-16 was activated on the Bitcoin network in April 2012. Since the activation of SegWit the number of P2SH inputs in being reported significantly lower than the number of P2SH outputs. This is due to a to Nested P2WPKH and Nested P2WSH outputs being indistinguishable from P2SH outputs. However, Nested SegWit inputs can be distinguished and are tracked here (Nested P2WPKH) and here (Nested P2WSH).
More information about P2SH can be found on learnmeabitcoin.com and the Bitcoin Wiki.