Yes this is possible with magento. You can make a coupon code specific for products, In admin panel
Store -> Attributes -> product
Search SKU in default label and edit the attribute.
In Storefront Properties set Yes to Use for Promo Rule Conditions.
Now Go to Marketing -> Cart price rules and edit/add a rule.
In Actions Tab under the
Apply the rule only to cart items matching the following conditions
(leave blank for all items) -> Click
+ icon and select SKU
and add only the SKU for which your cart price rule will be applicable.
If the coupon code need to apply for more than one product, instead of
is one of.