Should I erase pencil marks on primed trim before painting
Pencil marks will not have much effect on paint adhesion, and will not cause stainiong, but they may show through light-coloured paints.
So yeah either do a test to see if they show through, or just erase them.