Generally it’s the mobo chipset that determines which CPUs are compatible. Often the chipsets are compatible with two generations of CPUs, that was the case with H6xx from intel, i got one with an alderlake cpu amd could upgrade it a year and a half later with rocketlake. The mobo OEM needs to support this in their uefi/bios