This link should help - tells what to do if it's still wet or dry:
If chalk or emulsion paint, you will need to team clean it before it gets dry. Soak up as much as you can with paper towels etc. first then Steam clean. If gloss paint you could try diluted thinners but it might still mean a new carpet or rug. Do you have insurance, might be worth claiming if it was expensive. Best wishes.
it’s either Goo Off or Goo Gone. One is very strong and might melt the carpet.
since I can’t remember which Goo product it is, someone here will remember.
Or take a snippet out of the back of the closet and test it in a glass dish.
Here is how to remove 3 different kinds of paint: https://www.wikihow.life/Get-Paint-Out-of-Carpet
If it is latex, blot if it is still damp, work as much out as you can with your fingers and Dawn dish detergent. Then steam clean. I keep a wrung out microfiber cloth handy when painting. Sometimes even with drop cloths, taping and caution you end up with paint on something. Keeping the spot damp makes it so much easier to blot and work it out. Even if it has dried, it can work.
Rubbing alcohol works. Pour some on, rub with a towel to remove the spot. It might take several applications. Test in a hidden spot first.
Different methods for different paints: