As
@Big Mama stated, as long as your new 22" tire has the same overall diameter as the stock 20" tire, and the new 22" rim has the same offset as the stock 20" rim, you should not have an issue. If you are also looking at purchasing a wider 22" tire than your stock 20" tire, you can use the web tool below to estimate the potential impact (rubbing on suspension components or fender splash guard) of the wider tire.
https://www.wheel-size.com/calc/
I used this app for determining whether on not I could use my current alternate wheel/tire combination, and it accurately projected the changes in critical clearances. Again, the use of this app in not an absolute guarantee that an alternate wheel/tire combination will fit without rubbing, but it provides a much better assessment, or projection, than simply an educated guess on your part, or a statement from others that it worked on a truck other than yours.