This might be a good place to start... I don't believe that Amazon offers the ability to auto order any more (Dash) but the HA elements should be pretty simple:
automation:
- alias: "Dog Food Low Alert"
trigger:
- platform: numeric_state
entity_id: sensor.dog_food_weight
below: 5 # pounds
action:
- service: notify.mobile_app_your_phone
data:
title: "Dog Food Running Low"
message: "Only {{ states('sensor.dog_food_weight') }} lbs remaining"
data:
actions:
- action: "ORDER_FOOD"
title: "Order Now"
url: "https://www.chewy.com/yourproduct"
This will at least give you a prompt on your mobile phone with the link to the product which you can of course customise. There's a load of other automations that you could look at as well, but this feels like a 'keep it simple' might be the best approach.
If there's an API that Chewy offers then there would be the ability to add/order a product then this could be enhanced further, as well as using Zapier to trigger with Amazon directly perhaps, but I would suggest keeping the trigger logic in HA then using an external integration if you want to do more than the notification approach?