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

Plug connection from B35*1B->B513*1B