35 Women received their dead raised to life again. Others were tortured, not accepting deliverance, that they might obtain a better resurrection.
36 Still others had trial of mockings and scourgings, yes, and of chains and imprisonment.
37 They were stoned, they were sawn in two, were tempted, were slain with the sword. They wandered about in sheepskins and goatskins, being destitute, afflicted, tormented —
38 of whom the world was not worthy. They wandered in deserts and mountains, in dens and caves of the earth.
39 And all these, having obtained a good testimony through faith, did not receive the promise,
40 God having provided something better for us, that they should not be made perfect apart from us.
dead raised to life again (v.35) — 1 Kings 17:22-24; 2 Kings 4:36
tortured (v.35) — streched on a wheel and beaten
deliverance (v.35) — offered if they gave up their faith
better resurrection (v.35) — better than those mentioned earlier in the verse who were raised but died again
imprisonment (v.36) — Jeremiah (for example) — Jeremiah 38:9
stoned (v.37) — Zechariah (2 Chronicles 24:20-22)
sawn in two (v.37) — Isaiah (tradition)
tempted (v.37) — pressured to abandon their faith
caves (v.38) — 1 Kings 18:4
something better (v.40) — those things given to believers after and because of the cross — union with Christ, individual access to God
Verse 40 seems to be saying that God did not fulfill His promise to the Old Testament believers while they were alive because He wanted to include the Hebrew believers of the first century (the Pentecost church) and, probably, also the believers of the Tribulation together in the promise which is now a better fulfillment because of What Christ has done.
All those listed or referred to in the chapter kept their faith even though they did not realize God’s promise.