Egg sac ?
I don’t know if it is from an insect or spider, probably insect. There is something visible inside. Spiders often stand guard over the egg sac and don’t attach them this firmly to a plant. In my own experience, ear wig insects have nests or dens that look similar to some that spiders make.