Hi, my name is Kerry
It is not possible to change the fuel filter without getting any air in the fuel system.
If the filter hangs downward, you can minimize the amount of air by filling the filter with fuel before installing it
but there will still be some air.
You will need to bleed the fuel system after installing the new filter.
A better question would be "How do I bleed the fuel system on a QSB6.7?"
Diesel engines usually have a bleed screw on the injector pump and a manual lever on the lift pump.
You loosen the bleed screw, then operate the lift pump manually until clear fuel, no air bubbles, comes out of the bleed screw.
If the lift pump can't be manually operated, you need to crank the engine to clear the air.
I haven't worked on a QSB so I'm not familiar with the location of the bleed screws, there should be one on the injector pump
and another on the rail.
Some rails have a pressure test fitting where you can let the air out, it looks like a tire valve with a cap on it.
Hope this helps.