All M-family series MacBook Airs claim up to 18 hours of battery life. Here are the test details that Apple details, which might differ greatly from your workflow:
Testing conducted by Apple in April and May 2023 using preproduction 15-inch MacBook Air systems with Apple M2, 8-core CPU, 10-core GPU, 8GB of RAM, and 256GB SSD. The Apple TV app movie playback test measures battery life by playing back HD 1080p content with display brightness set to 8 clicks from bottom. Battery life varies by use and configuration. See apple.com/batteries for more information.
See MacBook Air 13- and 15-inch with M2 - Apple. What types of apps/workflows are you using?