Problem
You get an error if you try to install Drush in Drupal 11, which will be officially released late July 2024:
Solution
Drupal 11 is only a few weeks away, so all those who are installing Drupal 11 will run into this problem, and hit a full stop ...
Perhaps chi-teck/drupal-code-generator can get a release before too long, so that the users who are installing Drupal 11 don't get this error?