Fun fact, we have no known quotes that are 100% certain to be from Socrates himself: he died without leaving any written works behind. Everything we know about Socrates is stuff published after his death that used his image as a way to push personal philosophies (Plato being the biggest offender). It's called the
Socratic Problem, and it's something you learn about in the first few weeks of beginner philosophy courses as an example of the "argument from authority" fallacy and how it can be used to warp arguments and perceptions.
The basic idea is, if someone's attributing quotes to Socrates, they've already failed in whatever point they're trying to make. Socrates is the ultimate example of using someone's name to lend credence to your own arguments, because Socrates wasn't able to pass his teachings along to us in his own writing. "Socrates" is a different person depending on which source you're reading.
BTW, a quick google search for this quote in particular doesn't even immediately provide a source text, just a shit-ton of facebook posts and crappy blogs. No way of knowing if it's even from one of the Socratic dialogues (it's been literal decades since I read them myself). I see a lot of "inspirational quote" images with it sourced to Welsh Merlin and a motivational speaker named Jeff Wheeler, but that doesn't roll off the tongue quite as well.
tl;dr: Don't quote Socrates to make a point, it's something internet grandmas and scam artists do