That is down to the buyer.
When you buy a mobile phone, your advised how many updates / years your device will be supported for.
Historically it would be about 2 OS updates and maybe 3 years of security patches.
Some top end devices like the S25 Ultra now getting up to 7 years and some A Series now getting up to 5 or even 6 years.
This is the direction of travel but for older devices, their original updates will remain.
I am not employed by Samsung nor do I receive any remuneration as a Samsung Members Star.
My device is an S25 Ultra.