In a number of the built-in Mac apps (including Preview, Pages, and Keynote), macOS added the quiet feature of retaining older versions of document you modify. This versioning feature doesn’t require Time Machine, even though it looks a lot like that feature and service. You don’t even have to enable it—it just works in apps that support it. You can access past versions via File > Revert To > Browse All Versions.
These apps store a version every hour while you’re working on it, or more frequently if major changes are made. There’s no hard-and-fast rule about how far back these versions are stored. They tend to take up fairly little space, because Apple relies on storing just the differences between two files, which for most editing involves very little overhead.