Both macOS and Windows have their own security features and vulnerabilities, so it's not accurate to say that one operating system is universally more secure than the other.
macOS is generally known for being more secure than Windows, but this is partly because macOS has a smaller market share and is therefore less of a target for cybercriminals. In addition, macOS is based on Unix, which has a reputation for being more secure than Windows.
However, this doesn't mean that macOS is completely immune to security threats. For example, macOS has been targeted by malware such as the "Flashback" trojan and the "KeRanger" ransomware in the past.
Similarly, Windows has been the target of numerous security threats over the years, but Microsoft has made significant improvements to Windows security in recent years, such as the addition of Windows Defender and other built-in security features.
Ultimately, the level of security of an operating system depends on a variety of factors, including the software and hardware configurations, user behavior, and the implementation of security measures. It's important for users to stay informed about the latest security threats and take appropriate steps to protect their systems, regardless of the operating system they are using.