I think ALL versions of Gromacs are compatible with linux. However, which version you want to use is up to you, and you better know the pros and cons. The most recent version will be faster, may have more functions, sometimes difficult to install due to library compatibility issues (you just need the patience to make it work), may have certain unknown bugs etc.
The most stable and compatible version of GROMACS for Ubuntu 24.04 is GROMACS 2023.x. It's recommended to use the latest stable release, as it includes bug fixes and improvements. You can install it from the official GROMACS website or via package managers.
All of which can be easily done at mdsim360.com, a new platform that lets you run MD simulations entirely online without local installation.