Short answer: The tech stack and development environment chosen by the agency directly affect you, because the languages and tools used determine how quickly you can find developers to take over later, your ongoing maintenance costs, and the app's hardware compatibility. If the agency uses proprietary closed-source libraries instead of popular, standard technologies, you will be vendor-locked.
When drafting the contract, your first priority is to clarify code ownership and delivery format. The proposal must state that delivery includes not just a working build, but the full source code in a Git repository with standard documentation and a clear breakdown of external licensing dependencies. Bar the agency from using proprietary, closed-source core modules they wrote themselves, or explicitly demand full source code and unrestricted usage rights for those modules.
Second, establish the technology standard. If this is exclusively for iOS, an industry-standard native language like Swift is the way to go; if Android is on the roadmap, opt for widely adopted cross-platform frameworks like Flutter or React Native that boast large pools of independent developers. Stay far away from obscure, outdated, or niche hybrid platforms.
Finally, include handover and warranty terms. Tie the final milestone payment to a minimum 60-day post-delivery warranty and an independent code review and sign-off by a third-party expert or your incoming developer.