This Fits Your 2023 BMW M340i Sedan
Full size assembly image of Plug connection from E123*1B-->E165*1B (1/2)

Plug connection from E123*1B-->E165*1B