How do you know if a girl is being friendly or if she is attracted to you?

My biggest problem is my killer instinct. I can have a girl talking, smiling, and laughing but I won't escalate things (ie. ask for number, go for kiss, F-close) unless it's obvious she likes me. This happens less at a bar or club (I care less) but more in places where I have social capitol (ie. work or school).

I think this mindset came from some deep-rooted insecurities from my childhood. I did not grow up super popular and the girls I had a crush on never liked me back. My brain must have some "mental residue" from those days.

Here's how I interpret it: I assume if a girl is smiling and laughing at my jokes it's because I'm a funny and charming guy. The way I see it, of course she will like me, I'm cool as fuck. But instead of assuming she also likes me in a sexual way I think it's her being friendly and not "I want you to fuck me right now."

This is a terrible mindset to have and it's hard to just "assume attraction."

For clarification, it's easy to do this at a bar or club because getting rejected is not as big a deal. But in my classes or at work, showing my intent and it not going well feels like I'll be committing 'social suicide'. I don't want to make things awkward with the girl / have her feel uncomfortable.

Any advice on getting over this sticking point? Maybe a reframe or a way to know the difference b/w a girl who likes me as a friend and who is sexually interested.