It's not like there isn't a number of screen recording and keylogging tools and/or malware available for any mainstream desktop OS.
Sandboxed macOS apps (e.g. anything from the Mac App Store) cannot log keystrokes or make screen grabs without the user giving explicit permission to do so.
Sandboxed macOS apps (e.g. anything from the Mac App Store) cannot log keystrokes or make screen grabs without the user giving explicit permission to do so.