The foreman_setup plugin has been largely unmaintained. Getting "Wrong number of arguments" clicking next to Installation media · Issue #45 · theforeman/foreman_setup · GitHub says it’s been broken for 2 years and hasn’t really received attention for much longer.
This came up in Add shared GitHub Actions workflow for ruby testing by archanaserver · Pull Request #50 · theforeman/foreman_setup · GitHub.
Unless anyone steps up to become its maintainer, I’m proposing to drop it in Foreman 3.10 and add a deprecation to the Foreman 3.9 release notes.