Thank you for reaching out and posting this question!
I understand you’re looking to set a quantity limit to the cart and you prefer not using an app for this. Nevertheless, the easiest way to accomplish this is through a third-party app, such as Order Limits - MinMaxify or Order Limits (Min-Max), as they provide a user interface that allows you to manage these limits. In addition, if you need any assistance with setting up one of these app - the app developers are always available to assist you. You can contact the developers directly through the contact information found in the Support section of their app pages.
That being said, if you prefer to have something like this hard-coded into your theme, then you can also consider hiring a developer to assist you with this. However, I’m not having any luck finding an available tutorial for this. If you need help finding a developer, I’d recommend taking a look at Shopify Experts. Shopify Experts is a directory of certified developers that have experience working with custom coding and they’ll be able to create a custom solution for your store.
Since adding a quantity limit could potentially limit your conversions and revenue, may I ask why you don’t want customers to purchase more?
I can see how having a tutorial or built-in option for limiting quantity can be beneficial for some of our merchants, like yourself, and I’d be happy to submit a feature request on your behalf. Though this isn’t something that I’ll be able to provide an ETA, as our Development team works on many different projects. Nevertheless, if Shopify moves forward with any changes or updates on limiting quantity, we’ll be sure to announce it on our changelog and/or updates page.
If you have any other questions on this topic, don’t hesitate to let me know!
but that still doesn’t track the CUSTOMER so you have to check previous orders, though you could tag them and then add a check on product pages to disable the add to cart for those customers.
An alternative is trying to use the discount systems “limit uses” feature
In total it’s a lot of moving parts which is why there’s no native feature and you either need an app or advanced theme customization and an app for the backend.