To make a Service/Quick Action take any file or folder as input, select:
Service receives selected
files or folders in
...at the top of the Automator window.
The selected files or folders will get passed as input to the first action in your workflow.
(Note: The workflow will not receive this input when it is run inside Automator! in order to test your your Quick Action by running it inside Automator, you need to temporarily add "Ask for Finder items" as the first action in your Workflow. Delete this action when you are finished building the Workflow.)
Among the many actions you can add is one called "Run Shell Script", which will likely be useful to you. If you change the dropdown to
as arguments, you'll be able to use the variables $1, $2, $3, etc to reference items passed from previous actions within your script.
After you have finished building your workflow and have saved it, you will be able to right click on any file or folder in Finder, and select your Workflow from the right click menu to run it.