Please could you advise on how to filter a user query, so that users from Group A are included, but not if they are also in Group B?
{% set vnp_users = craft.users
.group(['groupA', 'not groupB'])
.orderBy('field desc')
.all() %}
I'm not sure you can do that in one query only but I might be wrong.
Using two queries, you could do the following:
{# Fetch users from the group you don't want to display #}
{% set usersToExclude = craft
.users()
.group('groupToExclude')
.ids() %}
{# Built an array of ids to exclude adding 'not' to it #}
{% set exclusionList = ['not'] | merge(usersToExclude) %}
{# Fetch your users excluding the one found above #}
{% set vnp_users = craft
.users()
.group('groupYouWant')
.id(exclusionList).all() %}