Is it okay to stay in touch with your ex while you’re in a relationship?

Some people do this by the way that’s why I’m asking..
Is it okay to stay in touch with your ex while you’re in a relationship?
Post Opinion