If done properly, YTM should be computed with the dirty price (including accrued interest) - see here for a manual computation.
What else to consider? They do not expire all at the same time. YTM requires you to hold the bond to expiry. In between, you will be subject to price fluctuations. Neither do they all pay the same coupon. YTM itself does not factor in what you do with the coupons you receive. This is explained here. If you intend to reinvest, the higher the coupon the more reinvestment risk.
Also, do you actually use this platform? The minimum size may matter for you as well.
On top of that, these bonds are all fairly short term. If you buy a bunch of corporate bonds with a good rating, it will be very unlikely that the firms default and ytm will be higher.
Lastly, real returns may actually be negative with ~5%. If you expect inflation to stay high until these bonds expire, inflation protected bonds may be better suited for maximizing real returns (not saying it will, inflation expectations are fairly low at the moment). Also, if you are in the upper tax brackets, municipals can be very tax efficient.