Hi Daniela, here's a great tutorial to help you clean the mud stains from your carpet - https://www.thespruce.com/how-to-remove-mud-stains-2147113
Our DIY carpet cleaner has worked on mud stains from my dog! https://chemistrycachet.com/easy-homemade-carpet-cleaner/
LET IT DRY,THEN VACCUM
Have you tried a carpet shampooer?
They rent them from major grocery stores along with rug shampoo if you don't own one.
Just follow the directions and avoid using too mech detergent.
I agree with Wanda. Don't touch it until it's completely dry. Vacuuming will remove all or most of the spot if you didn't rub it while wet. Once vacuumed, brush it gently with a soft, dry brush or towel to dislodge the remaining soil and vacuum again.