At that age and mileage check the timing belt has been changed and the gearbox has been serviced.
Check all door locks lock and unlock, common fault.
Check all electrics attached to the boot lid are operational, lights, camera etc. common fault with loom from boot lid to body of car having broken wires.
Lift off the engine cover and look for the colour of coolant in the middle of the “V”, the plastic coolant pipe above that area can split and leak.
From reading posts on here the 3.0D seems to be the preferred engine with the S version producing 275bhp being the more powerful. As far as mileage goes there is at least one XF on the forum that is well over 300,000 miles on it and going strong, it’s all down to the way it’s been cared for by it’s previous owners.
Mine has just turned 10 years old this month and has been very reliable with only consumables and services needing to be done.