Yes, "Good morning, sir" is a correct and polite greeting. It is a standard way to address someone respectfully in the morning, especially when you want to show courtesy and formality. The use of "sir" indicates a sign of respect or acknowledgment of the person's authority or status.
However, it's important to consider the context in which you're using this greeting. If you are addressing someone who prefers a different title or pronoun, be sure to use the appropriate terms to respect their preferences. In some situations or cultures, using titles like "sir" may not be common or appropriate, so it's good to be aware of cultural and social norms. Always adapt your language and greetings based on the setting and the preferences of the person you are speaking to.