Use the InvocableMethod annotation to identify methods that can be run as invocable actions. Invocable methods are called with the REST API and used to invoke a single Apex method.
Invocable methods have dynamic input and output values and support describe calls.
For more info, check the below link
Cheers!!!