You go to the Software Update section of System Settings. You can configure updates to be installed automatically, or you can the updates download automatically & prompt you the updates are ready to be installed. See this Apple article for details:
Update macOS on Mac - Apple Support
If a Mac is compatible with a later version of macOS, many times that OS upgrade to the new major version will be shown first & appear to be the only option. It is not necessarily the only option as in your case where later Ventura update patches are available. These Ventura updates will appear below the top section advertising the new OS Sonoma.....it does not always appear like an option...you may need to click the "more info" link to actually see what Ventura updates are waiting to be installed.