You could start by removing and clearning the EGR and check how it progresses.
If it is an old car through an auction or auction dealer, you may have bought something with an existing fault.
The older the diesel cars get, the more likely is to buy one who has been butchered to remove DPF, EGR, original ECU setting, etc. That will cause all sorts of problems. Usually it turns out more relaxing and peace of mind to get the car you like and repair it instead of moving on to the next one because all will have some kind of problem.