Could be many things like a vacuum leak, bad mass air flow sensor, low fuel pressure, ignition issues. You will need to have a complete inspection performed.If you don't work on your own car then use this link to find a shop near you.
https://repairpal.com/repair-shops
Alex
RepairPal Certified shops can diagnose and repair your 2003 BMW 530i. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.