Just like the latest iOS 17 and iPadOS 17, you can recover accidentally deleted passwords on macOS 14 Sonoma as well. Go to Apple Menu > System Settings > Passwords > Recently Deleted and you'll see a list of passwords deleted in the past 30 days. Select a password you want back, click the "i" Info icon, and choose Recover.