An app is tied to the Apple Account that acquired it -
An App Store app is tied to the Apple Account used to acquire it (paid or free). The Apple Account is encoded into the licensed copy that is downloaded. It is in the copy's DNA. That is the only Apple Account that can redownload or update the app.
You can migrate the content from the original account that acquired it to another Apple Account*;
Migrate purchases from one Apple Account to another Apple Account - Apple Support
*This feature isn’t currently available to users in the European Union, United Kingdom, or India. Users in these countries will have to reacquire content, which may include repurchasing or set up a Family Sharing situation between the two accounts.
M1 Mac mini, macOS 15.3.1; Watch, series 10 GPS-only, watchOS 11.3.1; iPhone 16, iOS 18.3.1; TV 4th Gen, tvOS 18.3; HomePods, audioOS 18.3 and Airport Express w/ Airplay 2