Before you invest in bonds, don't rely solely on credit ratings. These ratings are just one opinion from a credit rating agency, and they can change quickly. To understand if a company can pay back its debts, you need to look at other things i.e. past bond issues and how profitable they are.; solvency ratios and other credit metrics can also help you assess a company's financial health
Further, you need to decide how long you want to keep the bond and whether you want to invest in government or corporate bonds.
Remember that there's no guarantee that any investment will be successful, so do your research and consider all the factors before investing. Investing in bonds can be risky as you may lose some of your invested money if you sell your bonds before they mature. The bond prices may fluctuate due to market conditions and the issuer's creditworthiness. But the risk gets bigger if the issuer defaults on the bond.