The closing chapter of Hebrews starts with this passage:
Hebrews 13:1–6 Let brotherly love continue. Do not neglect to show hospitality to strangers, for thereby some have entertained angels unawares. Remember those who are in prison, as though in prison with them, and those who are mistreated, since you also are in the body. Let marriage be held in honor among all, and let the marriage bed be undefiled, for God will judge the sexually immoral and adulterous. Keep your life free from love of money, and be content with what you have, for he has said, “I will never leave you nor forsake you.” So we can confidently say, “The Lord is my helper; I will not fear; what can man do to me?”
But people do all sorts of terrible things to believers. Was the author naive or mistaken? Of course not. He had just finished describing a few of the things that had been done to faithful believers.
Hebrews 11:32–39 And what more shall I say? For time would fail me to tell of Gideon, Barak, Samson, Jephthah, of David and Samuel and the prophets— who through faith conquered kingdoms, enforced justice, obtained promises, stopped the mouths of lions, quenched the power of fire, escaped the edge of the sword, were made strong out of weakness, became mighty in war, put foreign armies to flight. Women received back their dead by resurrection. Some were tortured, refusing to accept release, so that they might rise again to a better life. Others suffered mocking and flogging, and even chains and imprisonment. They were stoned, they were sawn in two, they were killed with the sword. They went about in skins of sheep and goats, destitute, afflicted, mistreated— of whom the world was not worthy—wandering about in deserts and mountains, and in dens and caves of the earth. And all these, though commended through their faith, did not receive what was promised,
So his point is that despite the things that may be done to us as believers, these pale in comparison to what Jesus has done and will do.
2 Corinthians 4:17–18 For this light momentary affliction is preparing for us an eternal weight of glory beyond all comparison, as we look not to the things that are seen but to the things that are unseen. For the things that are seen are transient, but the things that are unseen are eternal.
Side note: Notice how the first passage tells us to be content with what we have, because Jesus won’t leave us or forsake us. That’s the contentment Paul spoke of in Philippians 4:13, an oft-misquoted verse that teaches how to be content in any situation (do everything through Jesus!).