Learning is usually good and sometimes painful. Sometimes the process is painful—your brain muscles drip sweat out your forehead, and sometimes the conclusion is painful—the palm-of-hand-to-face sort of realization. You might learn that you need to change even more than your thinking, which may even involve changing communities. You could loose connections, you could lose those you considered friends.
In Galatians 4 Paul seems to be talking to Jews and non-Jews about their lives before receiving adoption as sons because of Christ’s work of redemption. The Jews “were under the law,” condemned by the law as sinners. Paul also described those “enslaved the the elementary principles of the world” (Galatians 4:3), those who “did not know God,” who “were enslaved to those that by nature are not gods” (4:8). Then he asks them, “now that you have come to know God, or rather to be known by God, how can you turn back again to the weak and worthless elementary principles of the world?” (4:9)
In context Paul is referring to works rather than faith in Christ. There is no system of salvation by works that isn’t enslaving, whether Judaism or Pagan Moralism, whether Islam or Roman Catholicism or the New Woke. Giving up false thinking may include leaving a community which is based on what is false. And then don’t go back to Egypt.
When God grants repentance, He grants understanding of the truth, and truth frees us. It frees us from being slaves, and unites us with other sons. We know one another, we practice the one-anothers, we confess our sins to one another (James 5:16). We learn Christ (Ephesians 4:20), and put on the new self in true righteousness and with the righteous (Ephesians 4:24-25).