2nd pick from this year is not a swap, it was originally meant to be a 2nd round pick but changed to a swap with draft rights to BalsaKoprivica and cash.
The 2023 involved a 2027 protected 1st Lakers pick, that is top 10 or top 5 protected. Both of these were done to help the Jazz hit that cap minimum before the date, as they are only at around $118 M and need to get to $127 mil or risk being penalized and losing things like the mid level exception and other benefits they will need. They will hit it with the Markkanen extension by after Aug 6, which gives them a 6 month wait or Aug 7 with guaranteed he can be traded at all next season, but this is a just in case move and for that swap asset.