I think this one is popular in various forms, Goodreads ascribes it to G.B. Shaw: https://www.goodreads.com/quotes/11546984-if-at-age-20-you-a... - but I believe it's fake, also it's not on his wikiquotes page. "If at age 20 you are not a Communist" gives many results but it's really hard to track back the source.
Sorry, didn't mean to come off critical at all. I know, but I've been hearing that stereotype for at least three decades, and I've actually seen the opposite.
Folks I know who were middle of the road, would now never consider voting for a GOP candidate in national elections. It wasn't the individuals I have in mind who changed.
I think that saying was already obsolete in the beginning of this century, at least in my experience.
But after a bit of digging I got to this: https://quoteinvestigator.com/2014/02/24/heart-head/
Conclusion: many forms, many misattributions, many transformations by various authors, but the saying is definitely not made up.