I'm sure whatever new box you buy will have the newest OS at whatever date it was built. Even a refurb will usually have the current OS. You may be able to find a slightly older "open-box" model, it might still have Big Sur (11).
Unless you need the portability of a laptop, a desktop model will be much less expensive. Since you already have a suitable(?) monitor (as well as keyboard/mouse), a new mini would be the least expensive. A new iMac will have a 24" monitor, you might be able to find a 21" model.
Don't forget to ask about any trade-in value!