These two OS’s have very different types of user and attacker (speaking in generalities), and thus different security trade-offs during design.
The main risk with Mac is that someone downloads a “Mac cleaner” or something similar which installs malware, or that malware is hidden in a legitimate looking app, and this is what SIP protects against. Even informed power users can make these mistakes - it only takes downloading one compromised utility!
IMO for most ‘home’ use where it is used as a main OS by a person without too much familiarity with computers, Ubuntu and many Linux distros are probably less secure than Mac - for instance the average user is conditioned to run random terminal commands they find on the internet and give them sudo permission. Obviously I’m excluding the majority of use-cases such as routers, consoles, tvs, servers where users access to the underlying OS is heavily restricted.