man you are SO right! if OP was talking abt making a story that was about being trans id also be telling him to take a step back and consider why he should be doing that, and ask him to tread carefully. i actually did write out smth along them lines, and then realised that OP is actually talking abt featuring a trans character in a story not about being trans, and said trans character might not even be the MC? which is absolutely what cis people should be doing.
having diversity behind stories as well as in them is important, but privileged people can help pave the way for that with representing the marginalised and unheard in their stories (and also uplifting marginalised creators, put ya money where ya mouth is)
that said... OP, if the trans character you want to write is the main character, i seriously advise talking to a good few trans people, maybe even getting a trans writer onboard as a cocreator, consultant, sensitivity reader... being trans is usually a really big part of someones life, and to tell the best story you can tell, it helps to go that little extra mile (thats not to discourage you from doing that btw, that would be awesome! but having a trans person in the writing process is really helpful for sensitivity and authenticity)