If you open this workflow in Automator, and click the Run button, you get this warning:
I would guess that this “Quick Action” workflow is expecting to get its input as specified, but that that happens as part of the Finder/system running the workflow, not as part of the workflow itself being run, hence the warning and the behaviour.
I suggest you follow its instructions and create a new workflow, and add the Get Selected Finder Items action to the front, and that works fine in my tests.