Assuming it's a diesel ...
Commonly this was caused by the SCV being damaged or dirty. Sometimes a good injector cleaner (Liqui Moly Fuel System Treatment is my preferred go-to for this) would resolve it but sometimes the SCV does have some scoring on it and needs to be replaced. Try the cleaner first, it won't do any harm!
If there's SOME improvement but you're still having issues, it's a pair of Torx bolts and an electrical connector to remove it from the fuel pump. Replacements can be sourced from eBay, places like Navaraparts are pretty good.
If there was no improvement at all with the injector cleaner it might still be the SCV, but there might be other issues like damaged injectors, or it might have just been a bad batch of fuel, or some algae (diesel bug).
Try the cleaner first and see how it goes.