Flirtation is a lot easier and more comfortable when you know the person already likes you. And it can seem creepy to them if they don’t already like you. So it might be good to not flirt until you’re confident it will be well received and in the meantime just be friendly and sincere. An important aspect of potential relationships is not appearing as if you think someone’s only value is if they’re a potential partner. People talk to and know other people, so treating everyone well can improve chances of potential partners thinking well of you. Sometimes the best thing you can do to find a partner is to work on yourself.
The problem with the golden rule is that different people want to be treated differently, so they may treat you how they want to be treated but not how you want to be treated, and vice versa.
Maybe when you’re struggling with an issue, you want to be left alone to figure it out by yourself, but your friend in the same scenario would want someone to start doing anything to help out and insisting on troubleshooting the issue together. So your friend ends up frustrating you by offering to help too much when you just want to be left alone and then when they’re struggling, they get upset that you leave them alone to deal with it.
So communication is important. Ask people how they’d like to be treated rather than just assuming they’d want to be treated the way you want to be treated and be honest with them about how you’d like to be treated.