The good news is soon we’ll be able to buy AAA bonds that pay 8% and CDs that pay 10%.
Buy if you are holding assets that in any way depend upon the value of bonds already issued, you’re screwed and without recourse.
If you invested in a bond mutual fund rather than the bonds themselves then you are correct. (Pretty much every 401K)
Generally better to invest in actual bonds. Assuming your bond issuer is solvent, hold them to maturity and you will get the face value at that time and the stated interest rate. You would be out any premium you paid, but presumably got a higher interest rate for as long as you held the bond. If you purchased at a discount, you will get full face so appreciation.