It depends. Your tires should match as much as possible, but if your tires are nearly new and only one is irreparably damaged, replacing that tire is fine. However, sometimes replacing just one tire is a bad idea, like in these situations:
If you drive a car with all-wheel drive
If the tread on your other tires is below the legal limit (one-sixteenth of an inch)
If you can’t find one that’s a perfect tire size and tread match
If you’re worried about the cost of replacing all four tires at once, consider an extended auto warranty with wear-and-tear coverage. These warranties often cover the cost of tire replacement.