I can’t speak on Samsung, but Google is getting much better with updates. Hopefully Samsung follows suit.
They did. Samsung starts 7 years of updates starting with the s24 series. Their midrange and previous flagship did 4os + 5 security years. Budget devices are currently on 2os + 4 security updates.