I've had long hair for years. For bike rides sometimes in a ponytail, sometimes a manbun. I just use bandannas year 'round. Same as my granddad. In fact I inherited a couple dozen of his old bandannas and added some of my own. Larger is better, easier to tie behind the head, over or under the ponytail as preferred.
No problems with the helmet slipping. Warm enough for most of our winter days. Occasionally I'll wear a hoodie. I have a thin long sleeve wicking fabric hoodie for moderately cold rides, a Nike Dri Fit hoodie for really cold rides, and both fit under the helmet. For really cold or wet weather I'll wear the hoods on my Shimano Storm Jacket or Columbia parka over the helmet. And I have ear warmers, those springy things made with microfiber fabric.
Helps to try some helmets to find one that has enough clearance in back for ponytails or buns. Some mountain biking helmets are better, but my Bell Formula MIPS has been fine.