This is done by making a ‘standard’ microflow and then exposing it as a “Microflow Action”
This can be done by navigating to the desired microflow, right-clicking and selecting properties.
Under the ”Expose as microflow”-tab you can check the box and it will give you options on how to name, a custom icon etc.
Can you please elaborate a bit more, what do you want to achieve?
Consider an example of MS Graph Module. When I installed MS Graph Module in my app, it came with many microflow activities. I have attached the same screenshot. Similarly, I want to develop my own custom microflow activity.