how to limit product quantity selector as per stock available

For eg: if my product has only 2 stock left, than the customers should be limit to select 3 quantity on product page, after selecting 2 quantity the + (plus) button on product page should be disable & Reduce the opacity.. it should be differ from product to product as per their stock left

i’m using impact theme

That’s an advanced theme customization,

Search first https://community.shopify.com/c/announcements/how-to-get-support-from-the-community/td-p/899914

And show effort so far by adapting existing solutions for most themes:

https://community.shopify.com/c/forums/searchpage/tab/message?q=limit%20max%20quantity&noSynonym=false&collapse_discussion=true

or for specific theme or adapt existing solutions for other themes https://community.shopify.com/c/forums/searchpage/tab/message?q=impact%20limit%20max%20quantity&noSynonym=false&collapse_discussion=true

Merchants that need advanced themes customization can contact me for services
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.