Passage
having chosen rather to be afflicted with the people of God, than to have sin's pleasure for a season,
having chosen rather to be afflicted with the people of God, than to have sin's pleasure for a season,
Hebrews 11:23 By faith Moses, having been born, was hid three months by his parents, because they saw the child comely, and were not afraid of the decree of the king;
Hebrews 11:24 by faith Moses, having become great, did refuse to be called a son of the daughter of Pharaoh,
Hebrews 11:25 having chosen rather to be afflicted with the people of God, than to have sin's pleasure for a season,
Hebrews 11:26 greater wealth having reckoned the reproach of the Christ than the treasures in Egypt, for he did look to the recompense of reward;
Hebrews 11:27 by faith he left Egypt behind, not having been afraid of the wrath of the king, for, as seeing the Invisible One--he endured;
The verse centers on "having", "chosen", "rather", "afflicted", "people", "than", "sin's", and "pleasure". It is saying that the verse draws attention to "having" and "chosen", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 24's "by faith Moses having become great did..." into verse 26's "greater wealth having reckoned the reproach of...", so "having" and "chosen" belong inside that flow. In Hebrews context, the local focus is Christ, faith, and discipleship.
A plain takeaway is to answer the verse's own emphasis on "having" and "chosen" with trust shaped by these words, not by a vague optimism outside the passage.