For my business application usage, with Photos and a few other apps thrown on top:
2014 i5 Mac mini with 8 GB RAM usually results in a few GB of swap file and several GB of compressed memory.
2020 M1 Mac mini with 16 GB RAM usually results in no swap file but about 3-4 GB of compressed memory.
2024 M4 Mac mini with 24 GB RAM usually results in no swap file but about 0-1 GB of compressed memory.
The 8 GB 2014 Mac mini was quite usable, but did lag from time to time, I suspect from the swap file in conjunction with a slower DRAM-less NVMe SSD, and of course from the slow CPU. (I used this until 2022, with Monterey.)
The 16 GB M1 Mac mini flies on Sequoia. It's very fast. I'd be happy using this for the next several years.
The 24 GB M4 Mac mini is even faster, but I suspect it has nothing to do with the memory. It's most likely because the CPU is nearly twice as fast as M1.
I'd say this Mac sees a light to moderate non-media workload, and a light media workload. So for basic users I'm sure 16 GB will be enough for several years. Remember, if you're not actively using the AI features, it's not occupying much memory, and from my understanding, it utilizes a few GB of memory when in use, not 8 GB memory.