One of the quotes below is something Jesus said. The other isn’t.
“On that day many will say to Me, ‘Lord, Lord, did we not prophesy in Your name, and cast out demons in Your name, and do many mighty works in Your name?’ And then will I declare to them, ‘I never knew you; depart from me, you workers of lawlessness.’” That one’s real.
“On that day many will say to Me, ‘Lord, Lord, did we not believe in You and trust that Your sacrifice on the cross for us finished the work of redemption for all who believe?’ and then I will declare to them, ‘Sorry, you weren’t paying attention; you had to also do good works to be saved. The faith that saves is never alone. You should have listened to the galatianists who told you so.’” Jesus never said that one, which came from the apocryphal book of Second Opinions.
Yes, the first is the true one. The second is the false one. That’s the opposite of what you would think if you have been hearing the gospel preached as, “Turn from your sins and be forgiven and saved. Your behavior, if it sufficiently changes, will be how you know you’re saved. Until then, you are only ‘making a profession of faith.’ Look not to Jesus, but to yourself and your fruit for assurance that you really believed.”