There is no Texas law that states how old the child must be before parents can leave them home alone. Instead, the concept of "neglect" is used to determine if they have failed to supervise their child properly.
The Texas Department of Family and Protective Services (DFPS)'s page on child supervision provides some guidance when deciding how closely to supervise a child. Of course, putting the child at risk of harm or danger may be considered neglectful. DFPS takes reports and investigates claims of child neglect and abuse.
Texas Family Code defines neglect in Section 261.001(4):
(4) "Neglect" means an act or failure to act by a person responsible for a child's care, custody, or welfare evidencing the person's blatant disregard for the consequences of the act or failure to act that results in harm to the child or that creates an immediate danger to the child's physical health or safety […].
Placing a child in situations that are beyond their maturity level can be considered neglect if it results in an injury or danger of harm. According to Subsection (4)(ii)(a), neglect includes:
(a) placing a child in or failing to remove a child from a situation that a reasonable person would realize requires judgment or actions beyond the child's level of maturity, physical condition, or mental abilities and that results in bodily injury or an immediate danger of harm to the child[.]
You should never leave an unattended child in a car, even for short periods of time. Entrapment can result in permanent injury or death. Leaving a child alone in a vehicle may also constitute a criminal offense under Section 22.10 of the Texas Penal Code.