There are two types of macOS keychain:
- file-based (including the "login" keychain)
- Data Protection (including the iCloud keychain)
Apple intends to phase the less secure file-based keychains out, but this will probably take several years as 3rd party application developers will need to update their software to use the newer Data Protection keychains. Data Protection keychains support passkeys, biometric authentication, and the Secure Enclave; file-based keychains do not.
The "login" keychain is used for secrets related to your specific machine. Most of these aren't needed when you switch to a new Mac, but some items, such as passwords for encrypted Time Machine backups, could be lost when you switch. I recommend copying the login keychain from
~/Library/Keychains/login.keychain-db when transferring to a new Mac, along with other essential tasks such as signing out of iCloud, deauthorising iTunes, and so on.
As @Gilby pointed out, if you migrate using a Time Machine backup the login keychain will automatically be copied over to the new Mac so copying it manually may not be necessary.
Some items, such as Secure Notes, can be copied from the login keychain to the iCloud keychain, and I would recommend doing this if you use the iCloud keychain. You can copy them in bulk but you will have to authenticate for each item.
iOS and iPadOS devices only have one keychain, the iCloud keychain (if used).