GPG error, Error in discourse-setup command

Just to add to the above from Jay, the current Debian release is 11. Stretch (9) was archived when support ended in 2020.

The current LTS (long term support) release is Buster (10) which will be supported into 2024.