@PlzNoPervs I really feel for you. I turned 40 this year, and I'd like to say it gets easier but you would not believe how common it is even amongst friends my age (male and female) to still be unsure whether people are flirting with intent, flirting playfully, or just being friendly. I've been told I'm a HUGE flirt at times when I've genuinely thought I was just being nice... it's a real minefield.
All I can suggest is that there is no substitute for experience. You might never grasp it fully (and that's okay, you're not alone in that), and there will be times you get it wrong, but over time you'll become a better judge. In the meanwhile just roll with the mistakes and try to encourage less subtle ways of communicating with you about attraction.
Hang in there - I hope you find the advice you need amongst the replies here.