The release notes mention that Homebrew 4.2.0 supports macOS Sonoma, but I’ve been using Homebrew on Sonoma just fine since public launch. What changed?
It's common for future macOS versions to mostly work in Homebrew over the summer, but they're not officially supported until later.