When I changed mine, I used a large 250ml syringe to fill the new filter with diesel before putting it back in the car. There are two pipes on the filter manifold that the fuel hoses attach to. I used a short length of plastic tube to connect the syringe to one pipe, and injected fuel in until it started to come out of the other pipe. I didn't even use fresh fuel, I put back what I drained out of the old filter into a clean jar, after checking there was no water or dirt in it. Keep the filter upright as you replace it in the car. When I started the engine for the first time, it fired up within a few seconds, not much longer than normal.
Having a big syringe is useful, I also use it to syphon oil brake fluid from the reservoir when changing the fluid, and for refilling the gearbox oil. I clean the syringe out afterwards to avoid cross-contamination