Generally, your legal capacity is governed by the law of your home country (your nationality), not Egyptian law. This is established under Article 11 of the Egyptian Civil Code, which states that a person's civil status and legal capacity follow the law of their nationality.
However, there is an important practical exception for expats: if you are entering into a financial transaction concluded in Egypt and producing effects within Egypt, and the other party is Egyptian and acted in good faith, Egyptian law on capacity will apply. This means that even if your home country's law would consider you lacking capacity for some reason, Egyptian courts may still hold you to the contract if your Egyptian counterpart had no reason to suspect any issue.
As a practical tip, always ensure your documents (such as a valid passport or residency permit) are in order before signing significant contracts in Egypt. If there is any doubt about how your home country's capacity rules might interact with Egyptian law, consult a local Egyptian lawyer before proceeding.
This is general legal information, not legal advice. For advice on your specific situation, consult a lawyer licensed in Egypt.