I'm 24 now and have been online dating on and off since age 19. I have tried everything from telling them in the first few messages to not telling them for a couple months to never telling them. I have never felt comfortable enough putting it in my public profile because for a while I was stealth and living in a small community where I didn't want anyone to find out.
I would say that out of all the options I've listed, my preferred method of disclosure is either messaging or texting the guy before we meet. That way we get a chance to chat a little and see if we connect at all, and if we do, I can find out if he's ok with my past before I waste any time going to meet him. My message/text-disclosure usually is something along the lines of this:
"Hey (dude's name) I just wanted to let you know something about me before we get to know each other better. I was born male-bodied but have always identified as female. I went through several different procedures and medical transitions to become the woman I am today. I understand this is not something everyone is comfortable with, so I wanted to give you the chance to think about it before we meet in person. Please let me know if this changes anything for you, because whatever you decide is okay."
I would say that has about a 50% success rate of getting the guy to still be interested to go on a date. However, I have recently quit online dating. I find the atmosphere more conducive to hooking up and not getting to know someone for who they are. I prefer meeting people through friends, common interests, etc. But hey, I online dated for six years and had some success with it at times so I'm sure you will too! Best of luck