The main way that TxtCart gains subscribers for your store is through the checkout. On the contact info page of Shopify’s checkout, customers have the option to leave their mobile number in the phone field. You should have a message displaying in this field (instructions are linked here) that lets customers know they could be texted if they enter their phone number.
Additionally, customers can opt-in through SMS pop-ups both natively and through TxtCart. Other ways customer's can opt in is through double-opt in, sms marketing check box, a variety of integrations (such as smart cart by Rebuy, which collects phone numbers at the sliding cart level, and more.