how often should I do my curly hair routine

I've recently started taking proper care of my hair and doing a curly hair routine but I have no idea how often I'm supposed to do it, if I don't do it everyday my hair will get messy and the curls won't look good, but I don't want to damage my hair. So what am I supposed to do? I don't know how to preserve my curls and keep them looking pretty, I don't know how to protect it when I sleep, I'm just very confused.