I probably have a different take on this. My parents taught me to acknowledge other black people I see by nodding/greeting/waving. There is a great Black-ish episode on this called "The Nod."
Partially because I grew up in mostly white areas. Partially because they are southerners and they are used to saying Hi. I ended up informally extending this to saying hi to people who looked receptive when I was younger.
When I got to college and lived in a bigger metro area, I stopped because I felt like it encouraged creepy people to interact with me. Being a woman in public is not always fun.
I apparently have a face or aura that encourages strangers to interact with me. It is a running joke that when I am out and about with friends they are shocked at how many people say hi and greet me without any provocation by me. I respond selectively. It is a thin line between friendly and sketchy. Most people are looking for a hello. But I have also experienced plenty of people who follow it up with a lewd comment or gesture.
I'll concur with everyone else. Say hi if you want. Don't expect people to say hi back.