“They are not of the world, even as I am not of the world. 17 “Sanctify them in the truth; Your word is truth. ... 21 that they may all be one; even as You, Father, are in Me and I in You, that they also may be in Us, John 17:16-21
Jesus' prayer is for us to be aligned with God's purposes - just as Jesus was - completely at one with his Father having the same intent, same purpose, same outcome, same means. This is what it means to be of 'one spirit'.
Galatians 4:6 And because you are sons, God sent the Spirit of His Son into our hearts, crying out, "Abba, Father!"
All spirit comes from God. The spirit that resides within the devil and his fellow workers of evil is also from God, but has become corrupted by sin.
Our human spirit is also corrupted (from Adam) and must be realigned, renewed, repurposed. Only God can do this by sending his spirit into us to begin the transformation process. He calls this the 'spirit of Christ' because the spirit that guided and drove Jesus is the same that is of God - Christ obeyed his Father and was at one with His purposes - this 'spirit of co-operation and service' is what God desires all men eventually receive - the same that was active in Jesus.
This spirit the Father gave the exalted Jesus, and he has then given it to those called that 'they be one' with him and the Father. (this is only a 'deposit' of the holy spirit 2 Cor 1:22, Eph 1:14 2 Cor 5:5)
Therefore having been exalted at the right hand of God, and having received the promise of the Holy Spirit from the Father, He has poured out this which you are both seeing and hearing. Acts 2:33
There is two uses of spirit - each having a purpose of good or evil. Those that are good are of the same nature as God, those that are selfish, prideful are of the devil and sinfulness.
1 Corinthians 2:12 We have not received the spirit of the world, but the Spirit from God, that we may understand what God has freely given us.
2 Timothy 1:7 For God has not given us a spirit of timidity, but of power, love, and self-control.
Romans 8:15,16 For ye have not received the spirit of bondage/slavery again to fear; but ye have received the Spirit of adoption, whereby we cry, Abba, Father…
God is bringing us to become like him in having the same purposes and desires - via the same means that Jesus overcame the world. His spirit guiding and granting victory over the corrupted spirit in us, which eventually will be perfect and holy at our change.
We cannot be aligned with God on our terms - via our means of works or by making our self 'holy' - that is the spirit of the world, of slavery, timidity, pride etc which thinks it doesn't need God to truly live.
2 Corinthians 3:17 Now the Lord is the Spirit, and where the Spirit of the Lord is, there is freedom.
v18 But we all, with unveiled face, beholding as in a mirror the glory of the Lord, are being transformed into the same image from glory to glory, just as from the Lord, the Spirit.
"we will come to him and make our home with him" is the reality of God and Jesus being at home in us without conflict but with harmony and co-operation - all done through His spirit effecting God's purposes in our lives - bring all men to salvation.