iMac 27" was a 5K monitor- an oddball resolution vs. a commodity resolution like 4K (or what will eventually be a commodity res at 8K). So choices are slim:
I believe there are a few others that are also 5K, including some that "stretch" screen sizes a bit taller or into the ultra-wide space. The "oddball" res yields less competition... which generally means relatively higher prices. 4K monitors can be had for much less but Mac at about 27" really "wants" 5K (and/or Apple really wants that price premium by not making macOS scale to any size and nice as Windows does it). macOS does work at any resolution but there are underlying reasons for 5K (or higher) over 4K at 27" or larger.
Apple fans will passionately argue for only the Apple one and thoroughly put down the rest... even though the LG used to be perfectly fine pre-ASD, when Apple pushed it in their own stores. Once Apple steps in with one, all others became "wobbly" and "plastic-y", etc... basically inferior in every possible way.
However, the others are popular and generally pretty well rated if you seek
objective opinions. Many Apple people have the LG because they bought it from an Apple Store when that was
THE monitor, seemingly endorsed by Apple.
As a long-term iMac 27" user myself, when I went separates I chose the
Dell 40" 5K2K ultra-wide. To my perfectly-fine eyes, it looks just as good as the old iMac 27" but provides much more screen R.E. AND includes a loaded hub with both "the future" and "the present" (use) ports along with multiple inputs instead of just one so that it can also accommodate other things connected to it without swapping cables. For example, Silicon kills Boot Camp and ARM Windows is not full Windows. So I went "old fashioned" bootcamp by also buying a Mac Mini-like PC and it is connected to it too. This monitor costs about the same as ASD so it's basically a lot more work space + loaded hub for the
same money.
If you have the WIDTH of space available, I very much enjoy the ultra-wide option and could never go back to any of the above 3 nearly square-shaped monitors, even if I found one for $1. On a height basis, even though the number is much greater than 27," the height is adjustable and can sit LOWER then the old iMac 27... or even your 24". Much of the surplus of 40" vs. 27" is actually in screen WIDTH.
Again, fans will argue for the one and only but if you also check ratings/reviews on non-fan sites, you'll likely get much more objectivity. Whatever you choose, be sure to seek out such reviews and- if possible- take a Mac into a shop where it is sold and connect them so you can see how Mac will look on that screen.
And if you are happy with the iMac, I suggest "love the one you're with" vs. replacing before you need something new. That iMac should have a few good years left in it. Consider the M6 or M7 replacements in about 2027-28.