Other questions:
Answered: Can counties like South Africa and India join since they’re part of the British commonwealth?
Answered: Can Asian countries like Japan join as well?
Answered: Can Mexico be join because it’s part of North America?
I had to repost this because of a spelling error
Yes. It's the organization created by the North Atlantic Treaty, after all (Actual text of the treaty) It was not intended as a global defense alliance. Member states are bound to respond to attacks on each other, in the Atlantic and Mediterranean north of the Tropic of Cancer. (Article 6) There is an exception for French Algeria, but that's not a thing anymore.
Apart from the founding members, which includes the USA, Canada and Iceland apart from continental European members, additional members are allowed by article 10: (emphasis mine)
The Parties may, by unanimous agreement, invite any other European State in a position to further the principles of this Treaty and to contribute to the security of the North Atlantic area to accede to this Treaty.
In other words, NATO is only open to new European member states. In addition to which, South Africa, India or Mexico are all entirely or partially south of the Tropic of Cancer and would have little benefit of the treaty as written, anyway.
In short, a global alliance would require a different treaty. Such were created in the 1950s, namely the ANZUS treaty (Australia, New Zealand, USA), and the Southeast Asia Treaty Organization (SEATO). As the name implies the latter was intended to be a NATO equivalent for that region. Support from the member states was pretty lackluster though, and the organization was dissolved in the 1970s.