I just checked, VMBS (Vanguard MBS) has yield of 3.73%, but VGLT (Vanguard government long term bond) has yield of 5.08%. I thought MBS is riskier and would require higher YTM by the market.
If you opened a mortgage today, yes it would have a higher rate than treasuries of the same tenor (e.g. 30y). However, the MBSs that are owned by the ETFs contain mortgages that were originated over the past several years, when rates were 3-4%.
As new mortgages originate, are packaged into new MBSs, and bought by the fund, the YTM of the ETF should go up.
Note that MBSs, let alone MBS ETFs, are NOT guaranteed income. Yes, the interest from the mortgages should be stable, but the MBSs (and hence the ETF) can lose value if interest rates rise or if a significant number of mortgages default or are repaid earlier than expected.