Hey, Gary, thank you for your answer!
Unfortunately I have an error “syntax error, unexpected ‘->’ (T_OBJECT_OPERATOR)” for the following line:
new \WPDiscourse\Utilities\PublicPluginUtilities()->discourse_request(
The PHP version is 7.4, it must work. I don’t have the idea about the reason error occurs.