From what the question seems to imply:
the most significant file that the macOS system writes for itself is perhaps its own version number file?
That file is located at
If that file contains, for example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<string>1983-2018 Apple Inc.</string>
<string>Mac OS X</string>
Then the above is for Sierra 10.12.6.