Thanks for the suggestions. I did reset Throttle valve, VVT and VANOS adaptations with INPA but to no avail. Still happening. Although I had noticed specifically when I reset VVT it started fine twice right after that but then back to same problem.
I also tried disconnecting the MAF and it kind of changed the behavior. Instead of dying right away it sort of hunts (RPMs go up and down) and then stabilizes later. I cleaned the MAF with CRC MAF cleaner but same thing. Don't think that's it.
I need to check the fuel trims I was told. I don't think there's fuel supply issues. It starts right away, no long cranks.
Battery was fully charged last week too in case there were voltage supply issues.
I also came across an interesting video by BMW doctor (Dean) about updating modules to latest but not sure if this is plausible scenario as of yet.
RESOLVED: vanos solenoid connectors were swapped
not sure how I missed it but that's what happened.