You have to pay for safety. On a real basis, after tax, etc, "safe" assets generally lose to inflation(with rare occasional exceptions).
Roughly in order of safety:
- FDIC insured accounts (HYSA, CD's, etc)
- Treasuries(to include I/EE bonds, tips, etc)
- Money Market funds(MMF) (SIPC insured)
- Cash like ETF's (SGOV, ICSH, USFR, etc)
- MYGA's (SPIC insured)
- Bank Accounts not FDIC insured, i.e. you went over the FDIC limits.
- Stable Value Funds (SVF)
- Municipal Bonds (not guaranteed, but generally state income tax free)
- Short term bonds
- Medium term bonds
- Long term bonds
- Real Estate(un-leveraged, i.e. no mortgage)
- Preferred Stocks
- Annuities, not SPIC insured
- Leveraged Real Estate (i.e. mortgaged)
FDIC insured accounts, MMF, generally lose to inflation.
Some treasuries should keep up with inflation at least(TIPS, iBonds, etc) but after taxes, you probably won't.
MYGA's are in the same boat, you might be able to beat inflation, but maybe only barely(and involve lots of insurance paperwork, apparently) and after taxes, doubtful.
Bonds can beat inflation, but there is zero guarantee and for the next decade almost certainly won't.
bonds except for the past 40-ish years have not even kept up with inflation. This is the rare occasional exception, alluded to earlier.
Real Estate will probably keep up with inflation, and if you treat it like a real business, you might even make some money.
Preferred stocks should beat inflation, but takes on considerably more risk than everything else above it, but after taxes you probably can make a little.
Equities should handily beat inflation, risk is obviously higher.
The safer the money, the less people are willing to pay you for it. There is no free lunch.
In general, there are 3 good reasons to buy bonds:
Safety: lowering the volatility of stocks(and hence lowering your expected returns)
To pay for a future expense: in which case you buy a bond fund with the duration of that future expense.
The idea that bonds are negatively correlated to stocks, and you want the re-balance bonus during high volatility. This is currently true with Long Term Treasuries(LTT) but is not guaranteed to be true tomorrow or next year. There have been long periods of time in history where it wasn't true. There are academic thoughts on why it might be true sometimes, but last I checked nobody knows definitively what makes the correlation change.
If you aren't buying bonds for one of those reasons, then you probably don't want to buy bonds.
For reason 1, BND is great. For reason 2, BND might be great, if your timeframe is 4-10 years and for reason 3, no, BND is bad look for something like TLT or EDV.
The US govt(and many other developed nations) have a bet that they have inflation under control, via TIPS, over 8% of the US govt debt is in Inflation Protected Securities. They are willing to sell more. That is the full faith and credit of the US govt saying, Inflation WILL stay at 2-3% over the long term, and we are willing to stake our entire global reputation on it. Betting against the US govt in the past 100 years has been a bad idea. Will it be a bad idea in the next 100? probably.
Anyways, the thing to think about around TIPS is they are real dollars. If you buy $100 of tips today, you will "guaranteed" get $100 of spending power tomorrow. a source
Long Term bonds
It depends on WHY you are wanting long bonds. If you want them as a volatility dampener, then long term bonds are a terrible idea, as they are ridiculously volatile.
EDV, which is an ETF of the longest term US treasuries you can get, has a stock like drawdown, with the worst year so far at -59.13%. This is what you expect of equities, not bonds! Of course the opposite happens too, the best year return for EDV was 56.08%! Which handily beats the best return of the S&P 500(37.45%). 
So for a volatility dampener, a total bond fund(like BND) is totally reasonable.
There are basically 3 general thoughts around owning long term bonds:
Wanting the volatility of long term treasuries specifically, because you believe the negative correlation with stocks will continue and combined with re-balancing will earn you a risk premium.
Buying bond for a known future expense in X years (where X is equal to your bond portfolio). In fund terms you would either need a target date maturity bond fund, or buy a short term and long term bond fund and then shift the allocation towards the shorter term fund as your future expense gets closer.
Belief that "Long-term bond funds not only offer superior diversification, but they also minimize interest rate risk for investors with long-term investment horizons (including virtually all investors who are currently accumulating retirement savings)." - source
I'm not aware of other valid reasons for owning long bonds.
0: source is portfoliovisualizer.com for VOO & EDV.