A tooth (plural teeth) is a hard, calcified structure found in the jaws (or mouths) of many vertebrates and used to break down food. Some animals, particularly carnivores, also use teeth for hunting or for defensive purposes. The roots of teeth are covered by gums.
Yes it is allowed to brush your teeth while fasting provided you don't allow any thing ( water, paste etc) to enter in your stomach.
Brushing teeth does not harm your fast as far as you are sure that you will not swallow any drop of water of any other material like tooth paste etc. while brushing or before or after brushing your teeth.
as salam alaikum
brushing teeth does not invalidate the fast.
With prayers for your success.