Thank you, Big Toad. My model is iMac Retina 4K 21.5 inch 2019.
What type of drive is in that iMac? If it is a mechanical HDD and Ventura works fine, I would not upgrade to Sonoma (or anything beyond). Sonoma is not appreciably bigger than Ventura. Ventura will continue getting security updates for another two years (1 ½-ish). I'm not sure how important that really is, though. It's too easy to hack the human to bother trying to hack the computer.
You could upgrade to the next major macOS from Ventura, if your Mac is supported. Five years seems to be the cutoff, lately, but that may just be coincidental to the rapid pace of hardware modernization.