If you have Game Pass Ultimate you can buy Xbox Live Gold 3 month membership codes and convert them into 51 days of Ultimate. This is much cheaper than buying actual Game Pass membership codes or subbing to it monthly straight from MS.
In mid-Sept, Xbox Live Gold is going away for good, so the cheaper codes will cease to exist. "Cheap" Game Pass codes are about $10 a month right now. XBLG codes work out to less than $4.50 a month depending on the current price (right now it's $6.82 + Paypal service fee which is around $0.60 or so if you buy several codes at once from Eneba).
If you don't have Game Pass at all currently, I don't recall the exact process but you can get a trial of Game Pass and use it to convert XBL Gold time at a ratio of 3 months = 2 months, so it's even cheaper that way. Used to be 1:1 but MS put an end to that a while back.