Rule 1: be attractive.
Avoid doing it at work.
ETA: dare to go inside a place you can mobile order from.
You can flirt at other times but you need other people to be clearly interested in that behavior (I mean, that’s true at all times but let’s be real about context). For most people commenting here on HN, I don’t think they know when that time is or maybe the nuances of flirting that are safe.
If you bump into someone at the hotel bar later, that's probably fine. Take "no" for an answer, don't be grabby, etc. all still apply.
And, like all activities, you learn the nuances and signals by trying, and failing.
Except, failing can have disastrous consequences in this age that does not forget (Google, Facebook, et.al.), and does not forgive (zero tolerance policies, harsh CoC penalties, etc).
Avoid flirting places where there's a zero tolerance policy or CoC that forbids it, then. Avoid hitting on people at work (yours, theirs, ours; the cashier at the grocery store almost certainly doesn't want to be propositioned in a customer service context) and conferences.
Bars don't have these. If you flirt and get turned down, it's not going on your permanent record unless you refuse to take "no" for an answer or you're assaulting/harassing.
People can and do take pictures of the 'offenders' at bars, gyms, even at the park, and post about how creepy they were on social media. Even if they aren't flirting, but just look silly or menacing or ugly or whatever.
This might not be a legal permanent record, but it will be there for discovery permanently. Social Media's propensity to do facial recognition on posted pictures will only help with this 'discoverability' of undesirables.
Haven't been on online dating in a while, but a 20% response rate seems astronomical compared to what most guys get.
Even when I did get a response, I was stood up more often than not. Online dating is a meatgrinder for men. If you're not tall and white it's really not worth having an account at all due to the toll it takes on your mental health.