I don't know how hot irons get. I would wonder about excessive heat damaging the fabric of a cloth mask.
If you are using all cotton, the worst it would do is scorch it.
Polyester will melt under high enough temps.
And with polyester, it depends on if it’s 100% or a cotton.poly blend.
When I iron some of my quilting fabrics, I often really nuke it.
The same with my husbands hankies and our pillow cases.
You just have to try it on a scrap piece of fabric to see how high you can go, at least with the ones you make yourself.