You could probably get it from the "defaults" command, but this particular data is really tricky. It is stored in /Library/Preferences/com.apple.SoftwareUpdate.plist, so you could use "defaults read /Library/Preferences/com.apple.SoftwareUpdate.plist". But most of the interesting keys are missing unless they are disabled.
For example, I have only ever configured my computers for "check for updates" and "security updates only", as displayed like so in Ventura:

Since technically I've only turned off one default option, the only interesting key in that preferences file is:
AutomaticDownload = 0;
If I had ever turned off (and maybe back on) "Check for updates", then I would look for a "AutomaticCheckEnabled" key. If I he'd disabled the security updates, I would look for the keys "ConfigDataInstall" and/or "CriticalUpdateInstall" set to 0.
But you're wasting your time. Apparently, none of this really matters.
Now this same key read from the user domain looks much more interesting:
defaults read com.apple.SoftwareUpdate
{
MajorOSUserNotificationDate = "2024-01-19 21:21:40 +0000";
UserNotificationDate = "2024-01-23 18:16:22 +0000";
}
Could I keep resetting this to be the current day and possibly avoid any future notification and/or unwanted upgrade?