Currently, the majority of the motherboards are using AM4, so it is better assumed that it will last a couple of more years. To be honest, it entirely depends on the processor requirement. If AMD somehow manages to shift to a new variant, then definitely to use newer processors, you would have to change your motherboard to a different version; but for now, you don’t need to worry about the AM4 dying out.