There are 2 possible ways to apply a discount in Shopify:
(1) discount codes
(2) draft orders
If we were to auto generate a discount code (1) - that would override any existing discount codes your customers used inside the checkout page which in turn would lead to frustration and confusion.
If we were to use (2), we would have to redirect the customer to a draft order checkout. Meaning, all of the information they added inside the regular checkout page will be lost. That would be really bad for conversions.
So, what our customers usually do is:
(*) Duplicate the product you intend to upsell
(*) Use the product price and compare price default fields in the product form -> that will make the app show the compare price crossed off, as if it was a discount.
The end result would be a "discounted" product.