My 2024 CX-5 is giving this noise on unlocking. It appears somewhere near the driver side headlight. The engine is not on, it starts appearing right after unlocking.
If it happens only when the lights are fully on, regardless of the doors being locked or unlocked and engine on or off, then it is the headlight motor assembly on that side. I just had that done on my '22 a few months ago. There is a TSB for this.
if its the headlights fan buzzing this is a warranty item. Known issue. Fix as soon as possible while under the 3/36 warranty as those headlights are pretty expensive.
Open the hood try to reproduce and see if it is the headlight or not