It is becoming more common -- take a wrench to your own car to do routine maintenance and suddenly the warranty is void. "Right to repair" legislation has been introduced to address this problem, but I'm not current on where it stands. I would never buy a car that was subject to this policy -- just one more thing to check into before buying a car.A live streamer I listen to once claimed that his 2019 Ford Explorer won't allow him to change the battery himself. That is, if you do it, the vehicle's main computer disables the engine until the dealer enters some kind of reset code.
Not sure if that's true or a common thing in newer vehicles, but it sounds plausible with how things are going in society in general.