It is a winter squash. You can eat them at any stage. If you want them for winter storage. They need to be fully ripe. The shell hardened.
? Where you live makes diference. So !!!
When stem dries.or fruit starts sunburing.
Pick. Otherwise leave them till plant is pretty much/dead.