Stallman was a prodigious programmer and wrote GCC (GNU C), a debugger and Emacs. He also created the GPL and founded the Free Software Foundation (from which the "open source" movement split off).
GNU was most of an OS by 1990 but didn't have a proper kernel (which was intended to be the ambitious Hurd).
In an unrelated move, Linus Torvalds used Stallman's tools to write a mini-OS and released it under Stallman's license in 1991. It naturally got incorporated into what some people (including Stallman) then called GNU/Linux. It was, in code terms, roughly 97% GNU and 3% Linux.
The naming is arguable because Linux was never a GNU or FSF development. However, Stallman's GPL allowed Linux operating system packagers (eg Debian) to use things that had been developed by or adapted for GNU.
Otherwise, Stallman told me he wouldn't have bothered with GNU if he'd known that BSD Unix was going to be available as free software. Unfortunately, FreeBSD wasn't released until 1993.
The only real reason that a Linux distribution hasn't been UNIX-certified is because RedHat and IBM found there was very little marketing value in calling it UNIX, that is, Linux is a stronger brand.
And I suspect the only reason MacOS is UNIX-certified is because they advertised it as "UNIX" and were sued by The Open Group, who owns the trademark. [1]
[1] https://www.cnet.com/news/apple-in-court-dispute-over-unix/
It's based on Red Hat. It has been officially certified as UNIX by The Open Group.