There is a psychology scale for measuring this personality trait called "authoritarian", first developed by Bob Altemeyer. One of the markers for this trait is that they insist everyone else follow their rules. Altemeyer has written and published a free book "The Authoritarians" which introduces his scale and theory for non-scholars at (https://theauthoritarians.org). Because the scale is developed with right-wing cultural vernacular, Altemeyer calls the scale "right-wing authoritarian" (RWA). Altemeyer thinks authoritarian cuts through different culture circles, such as left-wing and others, but those are not his expertise.
Much research has followed, but like most personality traits, we know little about how to change them. Altemeyer's own longitudinal (meaning tracking a group through their life, in his case his alumni) studies have found stable but small effect reducing RWA by higher education, and stable but smaller effect increasing RWA by becoming a parent. All in all not much change is observed.