“Why did the St. Thomas Christians have the Mass and other sacraments, which Protestants claim were invented long after the apostles?”
Likely, because they didn’t originate directly from St. Thomas...
“The earliest known source connecting the apostle to India is the Acts of Thomas, likely written in the early 3rd century, perhaps in Edessa.[9][13][14] The text describes Thomas’ adventures in bringing Christianity to India, a tradition later expanded upon in early Indian sources such as the “Thomma Parvam” (”Song of Thomas”).”
“An organised Christian presence in India dates to the arrival of East Syrian settlers and missionaries from Persia, members of what would become the Church of the East or Nestorian Church, in around the 3rd century.[22] Saint Thomas Christians trace the further growth of their community to the arrival of the Nestorian Thomas of Cana from the Middle East, which is said to have occurred sometime between the 4th and 8th century.”
Wiki
Always seems to trace to the third century...
The early third century is the early 200s. Still a hundred years before Constantine and the alleged paganization.