Determining whether it is better to repair or replace damaged concrete will always be determined on a case-by-case basis. However, there are questions you can ask to help decide which method will be better for the job.
A general rule of thumb is that if a repair requires more than two inches of material then it probably is better to use the replacement method. But being able to repair rather than replace concrete can be a more sustainable route that reduces the carbon footprint.