You’ll want to read RFC-84 Cross-product apps and https://developer.atlassian.com/platform/forge/migrating-a-forge-app-to-support-multiple-atlassian-apps/