Its a cleaning hack for those that have accidents from food or drinks.
Also, I would recommend cleaning the stain on the carpet immediately so its easier to clean.
So, this would be a helpful DIY cleaning tip that uses baking soda and vinegar.

Image by 116falconer via YouTube
There wont be any strong chemical smells from this.
Spray the vinegar on top of the baking soda and take your sponge to rub it in.
Continue to watch116falconer tutorialon YouTube for full instructions and details.

Then, spray with the vinegar again.
Place a paper towel onto the spot and spray more vinegar for it to soak through.
Let it sit for 30 minutes to an hour.

Repeat this process until the stain is gone.
Also, this method works but there may be a slight mark if its not cleaned thoroughly.