Knowing and accepting are two different things. I think I always knew I was gay but it took time for me to accept who I am and be comfortable with actually saying it out loud.
I am a gay cisgender man and came out when I was 18, almost 20 years ago now. It was scary and I was cautious to tell people at first. I would only open up and share that side of myself to those I knew well and trusted. Now, it is a lot easier, not keeping that piece of me a secret, and for me to introduce myself confidently and say “this is me, this is who I am”.