Mahler usually specifies both F and B flat trumpets. A quick scan of my scores shows that symphonies 1, 3-8 and DlvDE use both, 2 uses C and F, and 9 uses only F. (That is just a quick scan and might not be 100 percent.)
Checking online, I’ve read that the F trumpets were common in the 19th century, but around the turn of the 20th, B flat became more common. Also, some orchestras, lacking F trumpets, play everything on the B flats.
The F trumpet is a larger instrument with a slightly lower range. From my listening, I think Mahler often uses one or the other in a way that appears counterintuitive, e.g., F is used for higher parts and B flat for lower. I suspect that he was after a particular timbre, making the instruments "reach" for relative extremes of register. Then again, when I hear a section, then check the score for which is being used, I'm often wrong.
Any musicians on the forum care to comment and, I hope, enlighten?