I am growing epazote for the first time and the transplant has a lot of flower stalks. Do you cut off the flower stalks like basil to increase production of leaves or is this a useful part of the herb?
Yes, pinch off the top growth as you need it.
Entire stems can also be harvested.
You can start new plants every 3 weeks or so to keep the supply growing.
https://www.gardeningknowhow.com/edible/herbs/epazote/epazote-herb-growing.htm
I am growing a plant in a pot. The leaves are small 1-2 inches and there are more flowers/seeds than leaves. How I get more and larger leaves on my epazote plant?
Unfortunately, your photo did not come through. I am unable to see the damage. It could be something as simple as nutrient deficiency, or something a little more complicated like an infection.
The first steps will be to test your soil for deficiency and pH swings. These articles will help:
https://www.gardeningknowhow.com/garden-how-to/soil-fertilizers/testing-soil.htm
https://www.gardeningknowhow.com/garden-how-to/soil-fertilizers/soil-ph-plants.htm
This article will help you with the care of the plant:
https://www.gardeningknowhow.com/edible/herbs/epazote/epazote-herb-growing.htm