Historically speaking, AMD's socket types (AM4, AM5, etc.) have been supported through multiple generations of chipsets and processors, unlike Intel where you typically only get 2 generations before you have to replace both motherboard and CPU to upgrade.
AM4 for example first launched in 2016, has had 3 generations of chipsets and 5 generations of Ryzen processors, and are still being sold today.
AM5 has had 2 chipsets and 2 generations of processors so far, with hopefully several more to come, before they introduce a new socket type.
Ryzen R7 5700X | B550 Gaming X | 2x16GB G.Skill 3600 | Radeon RX 7900XT
Ryzen R7 5700G | B550 Gaming X | 2x8GB G.Skill 4000 | Radeon Vega 8 IGP
Ryzen R5 5600 | B550 Gaming Edge | 4x8GB G.Skill 3600 | Radeon RX 6800XT