What is the type of variable that stores text in TextMeshPro?

So I wanted to create a variable that would store the text from TextMeshPro, but "public Text" doesn't let me connect these two. What am I doing wrong?

Also, the code

8967165--1232520--obraz_2023-04-22_214856022.png