In most cases, a basic public reverse username search is not illegal and does not violate privacy laws. However, hacking accounts, doxxing, stalking, and harassment would be unlawful. Focus on using public data ethically.