
Disable Magento_Version module to prevent disclosing your Magento version
To find the version of Magento that a storefront is using, simply append /magento_version to the end of the URL.

If you don't want to share this information with the world (not sure WHY this exists in the first place...) then here's how you disable it:
bin/magento module:disable Magento_Version
then recompile.
Alternatively, you can set up a 301 redirect in Admin > Marketing > SEO & Search > URL Rewrites.
Request Path: magento_version
Target Path: Your site's URL
Redirect Type: 301 (Permanent)