Did I cross a line by giving my highschool crush a note while she was already dating someone else? Or was this okay?

Back in highschool, I was borderline obsessed with this beautiful, artistic girl I shared some classes with. Which was already weird for me because I never had a "crush" anyone in school in the traditional sense before her. That's not to say I didn't find others before her attractive, I just didn't have a drive to actively pursue them. Despite that drive being present with her, however, I never made any moves on her because... well, because I'm a socially inept Autistic dude who was crushing on a girl pretty far out of my league. We had very few brief interactions that weren't about our work in Art class. I actually wanted to try having an actual conversation with her at our senior prom, but that's when I found out she was already taken. So... yeah, that was that. The week after our prom was when the letter my title mentions came in. I wrote a confession of sorts about my interest. It wasn't a ploy to make her like me back (Which my letter also stated), mostly just an attempt to get things off my chest. I stopped her in the main hallway while she was walking toward the parent pick-up line and gave her the note, saying it was from another student before going home. She didn't never reacted to it, at least not to me. As time went on, I actually started thinking I might've creeped her out with my letter and went to ask her while we left after our graduation. I think she misunderstood what I was getting at since, when I asked what she thought about the letter, she just said "I have a boyfriend. Yeah, I've had him for two years. I'm sorry." Then gave me a sympathic smile and left. That's honestly my fault, should've worded my question better. Anyway, that was back in May of 2023 and I haven't seen her since. But I still think about her, clearly. And I've gotten curious what others might think about this. So, do you guys think I crossed some kinda line by writing the letter to her?

Did I cross a line by giving my highschool crush a note while she was already dating someone else? Or was this okay?
Post Opinion