I microwave water in order to make tea. After it is microwaved and I drop the tea bag(green tea) into the water, thick white foam builds up on the top.
What is it and should I worry about drinking it?
When you boil water in a cup in a microwave, it will often boil without forming bubbles, because unlike a kettle with a rough heating element or inner surface, a clean ceramic cup has few nucleation points. Nucleation points allow pockets of gas to form, which become bubbles as the water boils.
When you add the teabag to the hot water, you are essentially introducing thousands of nucleation points very quickly, and so lots bubbles form very quickly - your foam. You should exercise caution when heating water this way prior to adding a teabag, as if you heat it for too long it can superheat, and will boil explosively out of the mug when you add the teabag.
There's nothing to worry about when you see the foam appear. When hot water comes in contact with tea, it extracts the amino acids and proteins that result in such foam.
The reason that you get more foam on the surface is when you microwave the water is perhaps dip the bag in hot water. When you put the tea bag in the cup first, part of the bubbles that appear will dissolve due to the moving water. Try to see if this makes a difference.
Check this page for more information: https://www.teasenz.com/chinese-tea/foam-surface-tea.html
This may not be direct answer to your question about what the foam is made up of. But when it forms and how to avoid it.
This often happens if the water is not warm enough.
If you like to avoid it, you can try these steps:
Most tea leaves should be placed in water near boiling point. That's 95C (or 200F) for black tea and 90C for Green tea. If you're not near sea level altitude just make sure the water reaches boiling point.
Pour the boiling water over the tea bag already placed in your cup. Dunking the dry tea-bag into hot water can lead to the issue ElendilTheTall talks about as well as foam.