You should avoid using toothpaste whilst fasting. However, you can still brush your teeth with a toothbrush and water, ensuring you do not swallow any water. It is recommended to continue using miswak during the fast.
Aisha reported that Allah’s Messenger (s) said, “Miswak is one of the best qualities of a fasting man.” [Sunan of Ibn Majah Hadith 3.1677]