In Heb 12:23, "firstborn(s)" a translation of πρωτότοκος (prototokos) which occurs just seven other times in the NT:
- Luke 2:7 - Mary gave birth to her firstborn [= Jesus]
- Rom 8:29 - Jesus is the firstborn among many brethren
- Col 1:15 - Jesus is firstborn of all creation
- Col 1:18 - Jesus is firstborn of the dead
- Heb 1:6 - Jesus was brought into the world as the firstborn
- Heb 11:28 - The destroying angel killed all the firstborn(s) in Egypt
- Rev 1:5 - Jesus is the firstborn of the dead.
Thus, πρωτότοκος (prototokos), singular, always refers to Jesus.
In the plural we have just two instances: Heb 11:28 & 12:23. The reference in Heb 11:28 is rather self-explanatory and needs no further comment. However, Heb 12:23 talks about the assembly (ekklesia) of the firstborn(s) which I believe are those attached to Jesus, or those who are like Jesus (1 John 3:2, Rom 8:23). In Rev 14:4, the saints are called the first-fruits to God and the Lamb.
Benson notes this:
And church of the firstborn — The whole body of true believers,
consisting of converted Jews and Gentiles. The saints are called the
firstborn, because under the law the firstborn were peculiarly
appropriated to God, and heirs of a double honour and inheritance: and
the saints are in a special manner devoted to God, are made his
children by a gratuitous adoption, and entitled to the heavenly
inheritance. Therefore they are said (Revelation 14:4) to be redeemed
from among men, the first-fruits to God and the Lamb, being the most
excellent of mankind, as the first-fruits were judged to be the best
of the harvest.
Matthew Poole reached the same conclusion. So did Gill, similarly with the Geneva Bible commentary, as does Meyer, etc.