Can I use the same Apple ID for multiple Macs if I only need Apple ID to update macOS?
If you're just installing and updating the OS, there's no real limit to how many Macs you can use the same Apple ID for. In fact, the Apple ID is needed only for downloading the OS installer app. Once you've downloaded the installer app, you can copy it to as many Macs as you want, or create a bootable installer disk from it and use that to install onto multiple Macs, or even set up one Mac as a Server, and serve a NetInstall image over the local network.
Updates to the OS are similarly unrestricted; you can install OS updates in the App Store application without any Apple ID, or download updates from support.apple.com/downloads and install them by hand. Note: an Apple ID is needed for purchased apps, but updates to the base OS and included apps (iTunes, Safari, etc) don't require one.
You can use a single Apple ID to log into a maximum of ten devices at a time (no more than five of them can be Mac).
For more information, you can refer to the Apple Support article, View and remove your associated devices in iTunes.