As an Automator Quick Action (e.g. QA Merge PDF) where you select the PDF in the Finder in the order you want them merged, and then on the first selected PDF, you control-click (two-finger tap) to access Quick Actions > QA Merge PDF from the secondary menu. The merged PDF will be written to your Desktop as merged.pdf.
And then drag/drop the Utilities Library > Run AppleScript action below it. Select everything in that Run AppleScript window and delete it. Then copy/paste the following back into that Run AppleScript action window:
use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use scripting additions
property NSString : a reference to current application's NSString
property NSURL : a reference to current application's NSURL
property PDFDocument : a reference to current application's PDFDocument
on run {input, parameters}
# tilde path to absolute path
set merged_pdf to (NSString's stringWithString:"~/Desktop/merged.pdf")'s stringByStandardizingPath()
set outurl to NSURL's fileURLWithPath:(POSIX path of (item 1 of input))
set outpdf to PDFDocument's alloc()'s initWithURL:outurl
set pdfList to rest of input
set lastPage to outpdf's pageCount()
repeat with pdfdoc in pdfList
set thisURL to (NSURL's fileURLWithPath:((POSIX path of pdfdoc) as text))
set thisPDF to (PDFDocument's alloc()'s initWithURL:thisURL)
# PDF pages are zero-based
repeat with n from 1 to thisPDF's pageCount()
set this_page to (thisPDF's pageAtIndex:(n - 1))
(outpdf's insertPage:this_page atIndex:lastPage)
set lastPage to outpdf's pageCount()
end repeat
end repeat
outpdf's writeToFile:merged_pdf
return
end run
Click the hammer icon in that Run AppleScript Action to compile this code, and then Save the Quick Action. I have used an example name for it above.