I've traded for a G17 and bought a G23 privately and I'm 18. It's legal in TX.
Take anything from the internet with a grain of salt, but this is what I've found:
There is no minimum age to possess firearms under Texas law, although federal law generally prohibits the possession of a handgun or handgun ammunition by anyone under the age of 18. 18 U.S.C. § 922(x)(2), (3) and (5).
Federal law prohibits firearms dealers from selling or delivering a shotgun or rifle, or ammunition for a shotgun or rifle, to any person the dealer knows or has reasonable cause to believe is under the age of 18. 18 U.S.C. § 922(b)(1), (c)(1). Dealers are prohibited from selling or delivering other firearms (e.g., handguns) or ammunition for those firearms to any person the dealer knows or has reasonable cause to believe is under the age of 21. Id.
Federal law provides less stringent age restrictions with respect to sales by unlicensed persons. Unlicensed persons generally may not sell, deliver or otherwise transfer a handgun or handgun ammunition to any person the transferor knows or has reasonable cause to believe is under the age of 18. 18 U.S.C. § 922(x)(1), (3) and (5). Federal law provides no age limitations with respect to the sale of a long gun by an unlicensed person.
An applicant for a license to carry a concealed handgun under Texas law must be at least 21 years of age. Tex. Gov't. Code § 411.172(a)(2).
In addition, no person may intentionally or knowingly sell, rent, lease, or give or offer to sell, rent, lease, or give any firearm to any child younger than age 18. Tex. Penal Code § 46.06(a)(2). However, it is an affirmative defense to this offense that the parent or the person having legal custody of the minor had given written permission for the sale or, if the transfer was other than a sale, the parent or person having legal custody had given effective consent. Section 46.06(c).