Aside from using cleaners, damage to carpet can be hard to remedy. But specks of paint can be removed with a utility knife, and a small area of damage can be replaced with a patch, if you have offcuts of the carpet.
Find a metal lid or other circular object, slightly larger than the repair area. Cut around it, down through the patch and the carpet below.
Lay offcut and lid over damage and cut through both layers