Obsessing over someone

I had some form of attraction towards a colleague 25 years ago when I was in college. I do not have any form of contact with him. However, sometimes I miss him and wish we were together. I was not able to have any fulfilling relationship with anyone. I feel immature and stupid. I understand there is no chance for this relationship, yet sometimes I just feel this longing for him. At the time, we were colleagues. I was not able to be close to him because he had a girlfriend with whom he broke up later.

I want guidance on how to understand and process my feelings. Am I immature emotionally? Do I have problems with attachments? I understand that there is no chance for this relationship, yet I sometimes fantasize that probably the situation might change, and we could end up together.
I don’t understand my feelings. Wishing to hear your insights. Thanks 😊