The Holy Spirit is the Spirit of truth. He convicts us of righteousness, reminding us that we are the righteousness of God in Christ.
The Holy Spirit bears witness that we are all God’s beloved sons and daughters – that is our true identity. “For you did not receive the spirit of bondage again to fear, but the spirit of sonship by whom we cry out “Abba Father”. (Romans 8:15)
The Holy Spirit also bears witness to the new covenant of grace in which we live, where God writes His laws of love, faith and liberty on our hearts, and He remembers our sins and lawless deeds no more. (Hebrews 10:15-17)
Therefore, any teaching we hear or read that is in line with the gospel that brings peace in our conscience and assurance in our hearts concerning our reconciliation with God through Jesus Christ is from God. Such teachings would declare that God is love, and God is good, and He has blessed us with every spiritual blessing in Christ Jesus. He has made us accepted in the Beloved. He sees us holy, blameless and above reproach.
Any other teaching that brings fear and condemnation is not from God. Examples of false teachings include: we must confess our sins or read our Bible or pay tithes or do any other work in order to be right with God or to score points with God, hellfire torture and damnation doctrines, etc.
Jesus said, “Come to ME (not a church organisation or building, or pastor or deacon or guru), all you who are weary and heavy laden (by legalism and religion), and I will give you REST.” (Matthew 11:28; words in parentheses are mine)