Log into your Q2A site as the admin user and go to Administration center → Plugins. Find the entry "XML Sitemap" at the bottom of that page and make sure the plugin is enabled. In the plugin options configure what you want included in the sitemap (I recommend excluding user pages and categories, but that's up to you).
Since you're using the third URL structure (/?qa=123/why-do-birds-sing), the sitemap should be accessible as
https://example.com/?qa=sitemap.xml
Replace "example.com" with your actual domain.
Then edit the the file robots.txt in your Q2A install directory (the folder where index.php and qa-config.php are located) and add the following line (if it doesn't exist already):
Sitemap: https://example.com/?qa=sitemap.xml
Again, replace "example.com" with your actual domain.
If you want the sitemap to be available like this (without changing the Q2A URL structure)
https://example.com/sitemap.xml
you need to rewrite the URL in your webserver. For Apache that would probably look like this:
<Location "/sitemap.xml">
RewriteEngine on
RewriteCond "%{REQUEST_URI}" "^/sitemap\.xml$" [NC]
RewriteRule "^/sitemap\.xml$" "/?qa=sitemap.xml" [NC]
</location>
Also change the URL in robots.txt accordingly.
If your site becomes too large for a single sitemap (50000 entries), this enhanced version of the sitemap plugin might help. I haven't used it myself, though, so take with a grain of salt.