When specifying a quantity on the product screen of the Shopify theme "Dawn/Rise" and adding it to the cart, it is usually possible to specify a quantity greater than the stock quantity, but here is an example of how to set it so that it can only be specified up to the stock limit. Both the increment button and numeric input will only allow input up to the upper limit.
Example of setting a limit on the quantity selector for each variant on the product details page for the "Rise/Dawn" theme

[How to set it up] Add a custom Liquid block to the product information section of your product template and insert the code.

[Additional information]

