O believers! Fasting is prescribed for you—as it was for those before you1—so perhaps you will become mindful ˹of Allah˺. (2:183)

The Month of Taqwa (Piety)

Taqwa Has been given different, though related definitions. To be God-conscious, mindful, pious, fearful (all of Allah). But also, righteous, Godly, etc. etc.
It is a basic inner sense of knowing that Allah is with you and seeing you, therefore, you will always try to do good.
And it's an inner sense because it reflects your sincere, not fake intention of freely wanting to be in that state. Hence, the prophet (PPBUH) he repeated 3 times "Taqwa is here", pointing to the heart.
Perhaps a good description of Taqwa is the dialogue that went on between Omar (R) and Ubayy Ibn Kaa'b. When Omar asked him what is the meaning of Taqwa, Ubayy replied: "O Ameer of the believers (Calif), HJave you ever walked a thorny path? Omar: Yes, I did. Ubayy: What did you do? Omar: I wrapped my clothes and was careful as I walked. Ubayy: That is Taqwa!
Thus, it is more like a consciously preventive, and careful conduct. And, One good way to attain it, according to that verse is fasting. Hence why the prophet (PPBUH) mentioned in one Hadith, that fasting is like a shield.
So, How Does Ramadan attain Taqwa? Well, for true believers, Once you fast correctly and properly (according to the Sunnah), you will spontaneously develop Taqwa. Just imagine fasting all these hours knowing that, if you decide, you can break the fast any time without anyone knowing, except Allah! So, it will awaken and strengthen your conscience. It will discipline your sole. 
Add to that all the ancillary practices and Ramadan traditions that come with fasting, including supplication and constantly seeking closeness to Allah, reciting Quran, and keeping good company. The more, the higher grades of Taqwa you'll get when you graduate!