The answer really depends on what you intend to use your computer for, over time.
You list yours as being an "M4 Mac mini, macOS Tahoe, 256GB SSD, 16GB RAM".
If it's your main and only computer, eventually you will probably feel the squeeze of it having a small SSD and not a lot of RAM. (I would've gone for 24 or 32 GB and a 1 TB SSD.) If you keep using it after Apple stops the OS and security updates for it, you will eventually find that app software updates will no longer support the last supported OS you're running. At that point you'll have to either live with it, or hope there's something like OCLP years from now to let you run an unsupported OS on an Apple Silicon Mac, or else get rid of it and upgrade to a more recent computer.
In my case, I have a 2012 Mac mini with 16 GB, a 1 TB hard drive and I added a 240 GB SSD to it and converted the HDD to my Time Machine volume. It still runs macOS Mojave 10.14.6. It has a very specific function - it's a storage/media server (and Blu-ray ripper) in my living room. I tried using it to play media (via Kodi) but found that my Blu-ray player was a better media player so I just let the Mac mini do storage and media serving (via Plex). Because of its specific function I have no need to update it (yet). A more general-purpose machine will run into the limitations I mentioned above.
There's no reason to think that your M4 Mac mini can't last for years and years, until you run into those limitations.
You list yours as being an "M4 Mac mini, macOS Tahoe, 256GB SSD, 16GB RAM".
If it's your main and only computer, eventually you will probably feel the squeeze of it having a small SSD and not a lot of RAM. (I would've gone for 24 or 32 GB and a 1 TB SSD.) If you keep using it after Apple stops the OS and security updates for it, you will eventually find that app software updates will no longer support the last supported OS you're running. At that point you'll have to either live with it, or hope there's something like OCLP years from now to let you run an unsupported OS on an Apple Silicon Mac, or else get rid of it and upgrade to a more recent computer.
In my case, I have a 2012 Mac mini with 16 GB, a 1 TB hard drive and I added a 240 GB SSD to it and converted the HDD to my Time Machine volume. It still runs macOS Mojave 10.14.6. It has a very specific function - it's a storage/media server (and Blu-ray ripper) in my living room. I tried using it to play media (via Kodi) but found that my Blu-ray player was a better media player so I just let the Mac mini do storage and media serving (via Plex). Because of its specific function I have no need to update it (yet). A more general-purpose machine will run into the limitations I mentioned above.
There's no reason to think that your M4 Mac mini can't last for years and years, until you run into those limitations.