While reading online about interest rate risk associated with bonds it stated that if an investor plans to hold a bond until its maturity then interest rate risk is insignificant since the final return is already known. But for example if they bought a bond and a year later interest rates go up, aren't they missing out on earning a higher yield? and so would there not technically be a risk of them missing out on earning a higher yield?
No, because risk is a measure of the unknown. You know what your return will be, so it's not unknown.
Lower risk investments have more predictable outcomes.
There is still some market risk, opportunity cost and default risk; these things should be priced in to the yield of the bond given the facts and circumstances existing when you buy the bond, but you know your outcome up front if you hold to maturity.