If you want to read current psychological research on this I'd suggest this paper. It explores the personality attributes of people who virtue signal and what they have to gain from it in current society, and why that wasn't the case before. The personality types are Machiavellianism, Narcissism, Psychopathy - also referred to as the dark triad.
https://scottbarrykaufman.com/wp-content/uploads/2020/07/Ok-...