The adults are tiny little flies that you could only keep out with insect mesh. If you see affected leaves, the usual advice is to pick them off and dispose of them. I don't think there would be any risk to reusing compost from that pest.
If you are gardening in containers, it is worth emptying them out and checking for vine weevil grubs before you re-use compost.
Oh and welcome to the site