I posted the css code here Primary group class not available on usercard and user page if you want use it.
It works on staff group (admins and mods). Add label after your nickname, on post, on user-card and in your profile).
For primary groups it works only on post. I’m not be able to do the same in user-card and profile because there’s no different class between group’s members and other users.
I’m only a beginner in css but here on Discourse you’ll find professionists in css that can help you.