Should we use IANA groups 14 (MODP), 25, and 26 (ECP)? By looking at SonicWall Knowledge Base article Key exchange (DH) Groups Supported - Site to Site VPN:

It appears that our firewall supports DH group 25, and 26. Almost everywhere I've seen, they've recommended DH group 20-24 (we don't have DH group 24).

Should we use these groups? I don't understand how the ID of the DH group could be higher - using the same elliptical curve primitive - but use a 224-bit algorithm compared to our current 521-bit algorithm for DH group 21.

DH group 21 is also "only" a 512 bit algorithm compared to DH group 14, which is a 2048 bit algorithm. However I read that DH group 21 is still better than 14, because it uses elliptical curve.

EDIT: I've had a technical response vs a mathematical one below. It's appreciated, but a technical one helps me understand more given that we're configuring firewalls. The response is

"This group number is decided or is given by the IANA (Internet Assigned Numbers Authority).

The reason for these lower bit ECP groups to have the higher DH group number is that, the practical implementation (using a software code or a hardware chip) of the key creation and exchange mechanism was only available (or working) for 256, 384, 521 bit sizes. and that's why they were implemented  first (in-order group 19, 20 and 21).

with improvements in technology and the methods with which we write the software code or create hardware chips, it allowed us to have working models for 192 and 224 bit  Random ECP DH group and hence these were assigned a DH group number later.

Security wise, the 521 bit Random ECP group (DH Group-21) would still be on a higher side compared to 192 or 224 bit ECP group."
It appears that our firewall supports DH group 25, and 26. Almost
  everywhere I've seen, they've recommended DH group 20-24 (we don't
  have DH group 24).
  
  Should we use these groups?


NO, stick to groups 19-21 if possible!



According to the linked resource, DH group 25 is a prime-based 192-bit elliptic curve and group 26 is a prime-based 224-bit elliptic curve. These provide a security level of 96 and 112-bit respectively, that is the best known attack will require about $2^{96}$ or $2^{112}$ curve operations. I suppose these curves were standardized as enough people complained they can't computationally or by bandwidth or storage afford to use group 19 and the probably did so after 19-21 were standardized.

Now compare this to the groups 19, 20 and 21 which use 256-, 384- and 512- bit elliptic curves which respectively offer 128, 192 and 256-bit security. This is much better at a minor cost of performance. If you really can't afford to use these groups for performance reasons, then the 224-bit group should be fine, as its security is comparable to 2048-bit classic DH / RSA and the 192-bit group is risky as its security could be broken by a sufficiently determined attacker with sufficient funding, usually this is attributed to nation-state attackers.


  DH group 21 is also "only" a 512 bit algorithm compared to DH group
  14, which is a 2048 bit algorithm. However I read that DH group 21 is
  still better than 14, because it uses elliptical curve.


Group 14 uses classic finite-field diffie-hellman, i.e. $g^x\bmod p$ for a 2048-bit prime $p$. Because this operation exposes so much structure, there are attacks that are more efficient than the generic ones, which is all that works against elliptic curves. These attacks are so good, that a 2048-bit prime modulus for DH has roughly a 112-bit security level, which roughly corresponds to a 224-bit elliptic curve, e.g. group 26.

Also note that due to these more scalable attacks, group 1 is actually breakable, even by academics and group 2 which has a 80-bit security level due to its 1024-bit modulus has a decent chance of being breakable by a determined attack with sufficient funding. Also due to the nature of these attacks, it is sufficient if the attacker once does one big pre-computation for the parameter set and can then break individual DH instances very easily, think 1 week of pre-computation to solve each instance in 90 seconds afterwards.