How Do I Display a File using macOS Quick Look in a Popup Window?

Excellent!

You still might want to post your problem version, though -- especially if you are thinking of doing more "Execute Shell Script" actions. Moving paths cleanly between AS aliases, KM text variables, and shell script arguments can be a bit of bear, never mind the whole "getting the shell's environment right" problem... But once you've cracked it you can usually apply the same methods to your future macros.