People almost always say 你好 (nǐ hǎo) - not just 好 (hǎo) - when greeting someone.
你好 is a complete greeting meaning “hello.” It’s polite, neutral, and works in most situations (especially with people you don’t know well, in formal contexts, or in writing/teaching situations).
好 by itself doesn’t function as a greeting. It usually means “good,” “okay,” or “fine,” and is used as a response rather than an opener. For example, if someone asks you to do something, you might reply 好 (“okay”).