If you look at this link for a D5 Fuel filter you will see what should have been present even though it is a different make filter.
https://www.ebay.co.uk/itm/BFF8037-B...AAAOSwGJlZG8Cj
In addition here is a photo of a Mahle filter and you can clearly see the O ring in place ( PREFITTED). Are you sure your new one didn't have it already on?
In any case you can certainly remove the new filter and check for certain .
The large O ring on the filter housing should be absolutely fine to reuse, leave it in place and don't disturb it.
Good liuck and hope you get it sorted quickly. This sounds like something simple has been overlooked.