I bought a tri-fold hard cover that cost half the price of the realtruck. Although it is not functional enough, it meets my needs.
https://mostplusauto.com/collections/hard-tonneau-cover
You can try this method with a tape measure. It not only tells you how to measure but also tells you some common truck bed lengths. https://mostplusauto.com/blogs/articles/how-to-measure-for-a-tonneau-cover