2 Peter 2:21

21 It would have been better for them not to have known the way of righteousness, than to have known it and then to turn their backs on the sacred command that was passed on to them.

Read 2 Peter 2:21 Using Other Translations

For it had been better for them not to have known the way of righteousness, than, after they have known it, to turn from the holy commandment delivered unto them.
For it would have been better for them never to have known the way of righteousness than after knowing it to turn back from the holy commandment delivered to them.
It would be better if they had never known the way to righteousness than to know it and then reject the command they were given to live a holy life.