I generated a plugin using
drush generate plugin:example
Enabled the module.
Now when I go to Config > Web Services > Rest, I am getting error and the log message is TypeError: get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, string given in get_class_methods() (line 158 of /drupal9/web/modules/contrib/restui/src/Controller/RestUIController.php)
How do I fix this issue?