Official Documentation
https://www.drush.org/latest/commands/
An Easy Step-by-Step Guide to Writing Your Own Custom Drush 9 (and 10) Commands
Santhosh Kumar, Specbee, Sep 16, 2021
https://www.specbee.com/blogs/writing-your-own-custom-drush-9-and-10-commands
Generate a starting template with:
drush generate drush:command-file
, or shorter: drush gen dcf
$this->output()->writeln(dt('the output string'));