If you were active military at any time in 2022 then your W-2 is available from DFAS - https://www.dfas.mil/militaryseparations/W2/
If you are retired, the 1099-R is available on the DFAS website at mypay.dfas.mil.