While the number of CMOs at Fortune 500 companies declined last year, a larger percentage were women than in 2023.