Hamilton didn't gel with this year's car, and Mercedes didn't run the exact same cars for both drivers. I agree though it's a combination of a great driver/car that gets the wins, but Hamilton is a far better driver period. We don't yet know the extent of the RedBull advantage, especially looking at Max before last season. Hamilton has consistently been the best, to the point of F1 becoming boring for years as it was literally the Hamilton show.
RedBull had a noticeably superior car 2021/2022 and this I think has to do with the floor being more advanced.