How to add a custom command to an item in the calendar list in SharePoint Online

This is a question about handling a calendar list item in a modern site in SharePoint Online.

When I open a calendar item, my ribbon contains three tabs: Browse, View, and Custom Orders.

enter the description of the image here

I would like to add another item to custom commands. Something to execute a piece of code. How can I do this? I guess SPFx is out of the question because a calendar is not a modern list.

I am building a course program and I want the user to be able to sign up for the course when displaying the list item.

Grateful for any help and ideas.