How do custom context menus work? Is there a tutorial? I want to edit the Finder right click menu

The context menu action is just for showing a custom context menu, you can't change existing system context menus.

Instead I'd recommend to configure what you need in Apple's Shortcuts app, Shortcuts can be called from the "Quick Actions" context menu - sub menu in Finder


//edit 2024: this is now possible.

See

https://docs.folivora.ai/docs/6b_finder_context_menu.html

or this tutorial: