I think you need to replace headlight driver module I have checked real oem catalog but not sure which one you need this one
https://xenons4u.co.uk/bmw-tms-headl...6-7267045.html or
https://xenons4u.co.uk/bmw-tms-headl...5-7274400.html as I am not sure what is difference between to be honest LOL