What is the underlayment for a metal roof?

The problem is that this is a loose question.

The actual answer is almost anything. But usually plywood or OSB sheathing with a waterproof membrane between the sheathing and roofing.

Much beyond that, you’d need to specify the type of metal roof and what you’re roofing as these can change things dramatically.