I use Awesome Orange (or OxyClean) mixed with water on a rag. Or Spot Shot. They all work great.
Spot Shot for stains.Aerolsole can with orange lid. Not the spot shot general cleaning one. If it’s pet stains NEVER use a general carpet cleaner. Get one for pet stains. If you already used a general cleaner on pet stains there’s a chance you have already permanently set the stain. Spot Shot is anywhere like Walmart.
Resolve carpet cleaner works very well on carpet stains.