I have a simple formula for A-B operation using Filter.
A-B = FILTER(A1:A10,IF(ISERROR(XMATCH(A1:A10,$B$1:$B$4)),1,0))
A1:A10 - refers to set A
$B$1:$B$4 - refers to set B
The formula gives the A-B set, no need of ordering the sets.