If it’s anything line the older versions then it will be a clogged filter.
the screen wash used by bmw has an anti fungal agent in it, which some others do not, which prevents clogging.
the filters are fitted to the motors an the bottom of the reservoir. A quick dismantle and rinse with hot water should sort it.
hopefully this is the issue
Morning Martin
Welcome to the Forum
Could be the fuel pressure sensor, take the engine acoustic cover off on the passenger side of the engine is the inlet manifold plenum. At the back of the plenum you will see a sensor and plug, unplug it if the engine now runs freely through the revs the sensor is probably your issue. If not then a scan is needed to determine just what it is.
Dave