Rom 8:16 The Spirit himself bears witness with our spirit that we are children of God ESV
There is something foundational in these verses from Paul that, while subtle, is important for us to understand and hold onto. The Holy Spirit does not bear witness “to” our spirit that we are children of God (teknon; by birth), He bears witness “with” our spirit. The assurance of our salvation does not depend entirely upon external testimony of the Holy Spirit, there is an internal conviction that belongs to us. In other words, the Holy Spirit’s testimony (bearing witness) joins “with” our conviction confirming that we are children of God; 2 Cor 13:1 This is the third time I am coming to you. Every charge must be established by the evidence of two or three witnesses. ESV
Now let’s take that thought one step further.
When we are born again we get a new spirit: 2 Cor 5:17 If any man be in Christ he is a new creation; 2 Pet 1:4 We have been made partakers of the divine nature; and John 3:7 We have been born again. Or more directly John 3:6 That which is born of the Spirit is spirit.
Now, my point is that with a new spirit we not only get new life, we get new knowledge that is perfect. We have the absolute perfection of God within our new nature; the life of God. It is the life of God that allows us to walk in the light of truth. And it is the Holy Spirit bearing witness “with” (not to) our spirit that is the key to understanding Rom 8:29 For those whom he foreknew he also predestined to be conformed to the image of his Son, in order that he might be the firstborn among many brothers. ESV
As John Phillips put it: The Spirit Himself endorses our inward conviction that we really are the children of God. And it is that confirmation of our own conviction, our own witness, that gives us the foundation we need to press toward the mark for the prize of the high calling of God in Christ Jesus (Phil 3:14).
And that “high calling” is being conformed into the image (the character) of Jesus that we might be witnesses to a lost world to the glory of God.