They act on different hormone-receptor pathways: semaglutide acts on GLP-1, while tirzepatide acts on GIP and GLP-1. That general difference does not determine which is appropriate for a particular person; your clinician can review your options.
What is the difference between semaglutide and tirzepatide?
Comparison of semaglutide and tirzepatide medication