Why not just -Xmx8G and call it done?
The default JVM garbage collector isn't tuned for a process that allocates and frees memory in Minecraft's specific pattern — thousands of small, short-lived objects every tick, punctuated by occasional large allocations when chunks generate or a plugin loads data. Left on defaults, the JVM's garbage collection can pause the whole server for hundreds of milliseconds at a time, which players feel as a freeze or a rubber-band.
G1GC with Aikar's region and pause-time tuning breaks collection into smaller, more frequent passes instead, trading a little average CPU for far more consistent tick times.
A note on modded servers
Heavy modpacks sometimes need a longer Forge network handshake timeout (-Dfml.readTimeout) on top of the standard flags — already included automatically here when you select Forge / Fabric above.
Pair this with the right RAM
Flags only help if the heap size is right in the first place — use the RAM Calculator or the full Server Requirements Calculator first if you're not sure how much to allocate.