If it were me, I'd drop some anti-gel in it just to rule out that as a factor. A bad source of diesel fuel can make any diesel engine run like crap tbh. Hope that's all it is for you. I had a diesel years back when temps dropped rapidly and fuel gelled up. Wouldn't do anything but idle. Died out when you pressed down on the peddle. Dumped some anti-gell in it and let it idle for about 30 min and cleared it right up.
I'm sure there are a lot of preferences on what to use, but I just use what Walmart, or local auto parts store sells. Have had luck with Lucas anti-gel myself. I tried to get some extra the other day and was hardly any selection on the shelf though. I'm sure it's an area supply thing, and Memphis area has a ton of warehouses, shipping, air, etc going on. Especially with FedEx hub here.
If you get any error codes share them on this forum and there's a bunch of help here.