NATO does NOT belong to the EU and quite a few of the NATO countries do not belong in the EU.
In fact there are more countries in NATO than in the EU.
https://www.studyiq.com/articles/nato-countries/#:~:text=Currently%2C there are 30 member,%2C Portugal%2C Slovakia%2C Slovenia%2C
Currently, there are 30 member countries of NATO namely Albania, Bulgaria, Belgium, Croatia, Canada, Denmark, France, Greece, the Czech Republic, Estonia, Latvia, Germany, Hungary, Lithuania, Iceland, Italy, Luxembourg, the Netherlands, Montenegro, North Macedonia, Romania, Norway, Poland, Portugal, Slovakia, Slovenia, Spain, Türkiye, USA and UK.
https://www.gov.uk/eu-eea#:~:text=Austria%2C Belgium%2C Bulgaria%2C Croatia,%2C Slovenia%2C Spain and Sweden.
Austria, Belgium, Bulgaria, Croatia, Republic of Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain and Sweden.