If you are on a M-series MacBook and aren't running a 3D Benchmark the entire time, your Mac is broken if it is dying after 2.5 hours.
Have you checked your Battery Health?
If you have an intel-based Mac, it's the same expected battery life as Windows and 2.5 hours on an intel MacBook battery sounds decent for something 5+ years old.
8+ hours sounds about right. I have a M1 Macbook Pro and even 5 years later I can still use it (a million browser tabs, couple containers, messaging apps) for an entire day without having to charge it.
Have you checked your Battery Health?
If you have an intel-based Mac, it's the same expected battery life as Windows and 2.5 hours on an intel MacBook battery sounds decent for something 5+ years old.