Been there... a lot...
Usually, I just wait until the topic of LGBTQ+ comes up (it tends to come up every once in a while when I talk to people) and then gauge their reaction. If they don't seem to have a problem with it in general (if they did I probably don't want to be friends with them anyway) I casually tell them that I find them attractive. At least, my goal is to seem casual. 😅 I'm not sure if it always works.
Just be prepared for a no and try not to stress over it. That's why it can be helpful to do it via text so they don't see/hear if you're upset. I mean, you probably still want to be friends afterwards and that can be complicated after one asks the other out and the other is afraid they'll hurt one's feelings every time they hang out. Even if you really, really like them and actually are upset if they say no - which is totally understandable btw - it will get better over time and until then you can talk to other friends about it or us on here if you need someone to cheer you up or just listen.
It sounds like I'm telling you it will never work, but that's not what I'm trying to say. I just know there's a chance they might not feel the same way as with any crush ever and it's always good to be prepared. Other than that, just go for it. It might also just work. And perhaps they never even thought about it and with you telling them how you feel they will start to. 😊