Hello~Yes, it will cause an infection, any foreign matter in a wound has the ability to cause one. I would clean the wound, put a bandage over it, and watch it for any signs of getting worse. A doctor should be notified if this happens.
First, I'm not a doctor, but I have been around for 54 years. Any foreign matter in a wound has the potential to cause an infection, but it does not automatically guarantee that it will. Just clean the wound very well and keep it covered while it heals. See your doctor or go to urgent care if you are concerned or if the wound starts to become hot and painful to the touch, as that could be sign of an infection.