Agreed. Coming out to a crush has never helped me personally as it was pretty evident they weren’t showing as much interest in me as I had in them. For me, crushes have always happened when my exposure to the person was one-sided/parasocial (as seems to have been the case in your lesson). I have found that the most effective way to prevent this is to get to know people that excite you on a personal level before a crush can develop. This usually means enthusiastically trying to interact with them moment I notice them and abandoning them if it does not work out — instead of watching them for a while and then deciding whether to approach.
One thing that has always helped me stop thinking a crush is when I’ve gotten another crush. I’m not sure this helps you much though lmao
I also used to get crushes on people I met who I was platonically excited about, if I thought about them too much. Lmk if this is you and I can go into more detail