I’ve read your comment several times thinking about how to respond. I find it peculiar you were informed in advance there would be a transgender student in your class. Unless the student wanted you to know, that seems a pretty big violation of a student’s privacy and even a FERPA violation (assuming you’re in the U.S.?) That information should not have been shared with faculty unless the student requested it.
We addressed this issue head-on a few years ago and created a preferred name field in our registration software that allows students to have a legal name on file (for financial aid, etc.) and a preferred name that is on all other records, such as class rosters. In that process we found there are a lot of students (other than transgender/gender non-binary students) that this benefited. For example, those with a “court order of protection” who needed to obscure their legal name to protect against stalkers, harassers, or abusers. Or, sometimes, students who married and changed their names in the middle of their college careers, but wanted to continue being known by their original enrolled name. This can be especially important in graduate school when students start publishing and name continuity is key to building a publishing record.
Now, I just side-step the entire “calling the roll” exercise and ask students to go around the room, introduce themselves with some brief biographical info, and leave it up to them to tell me what name they want to use. But I don’t take attendance in any of my classes, so that makes things easier.