A good example from the Amazon cart page:
As you can see, it shows a pretty prominent scarcity trigger (using red color) for the Logitech keyboard - "Only 11 left in stock - order soon."
An excellent example from Backcountry shopping cart:
I'm buying a product with 20% off (which is highlighted on the cart page too) and they display a scarcity element "Only 4 in stock" above the pricing section. These 2 elements work together and the main purpose of them is to persuade a shopper to buy right away, otherwise it can be out of stock or discount will end.
An example from FashionNova
Here's the product with a very big discount and you can notice the "Final Sale" badge notifying users that they can miss this product if they don't buy it right away. It's quite a subtle scarcity trigger, but anyway it can motivate someone to complete the purchase.