How do I get right with God?

In order to get “right” with God, we must first understand what is “wrong.” The answer is sin. “there is none that doeth good, no, not one.” (Psalm 14:3). We have rebelled against God’s commands; “All we like sheep have gone astray” (Isaiah 53:6).

The bad news is that the penalty for sin is death. “the soul that sinneth, it shall die.” (Ezekiel 18:4). The good news is that a loving God has pursued us in order to bring us salvation. Jesus declared His purpose was “to seek and to save that which was lost.” (Luke 19:10), and He pronounced His purpose accomplished when He died on the cross with the words, “It is finished” (John 19:30).

Having a right relationship with God begins with acknowledging your sin. Next comes a humble confession of your sin to God (Isaiah 57:15). “For with the heart man believeth unto righteousness; and with the mouth confession is made unto salvation.” (Romans 10:10).

This repentance must be accompanied by faith – specifically, faith that Jesus’ sacrificial death and miraculous resurrection qualify Him to be your Savior. “if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved.” (Romans 10:9). Many other passages speak of the necessity of faith, such as John 20:27; Acts 16:31; Galatians 2:16; 3:11, 26; and Ephesians 2:8.

Being right with God is a matter of your response to what God has done on your behalf. He sent the Savior, He provided the sacrifice to take away your sin (John 1:29), and He offers you the promise: “that whosoever shall call on the name of the Lord shall be saved.” (Acts 2:21).

A beautiful illustration of repentance and forgiveness is the parable of the prodigal son (Luke 15:11-32). The younger son wasted his father’s gift in shameful sin (verse 13). When he acknowledged his wrongdoing, he decided to return home (verse 18). He assumed he would no longer be considered a son (verse 19), but he was wrong. The father loved the returned rebel as much as ever (verse 20). All was forgiven, and a celebration ensued (verse 24). God is good to keep His promises, including the promise to forgive. “The LORD is nigh unto them that are of a broken heart; and saveth such as be of a contrite spirit.” (Psalm 34:18).

If you want to get right with God, here is a sample prayer. Remember, saying this prayer or any other prayer will not save you. It is only trusting in Christ that can save you from sin. This prayer is simply a way to express to God your faith in Him and thank Him for providing for your salvation. " God, I know that I have sinned against You and am deserving of punishment. But Jesus Christ took the punishment that I deserve so that through faith in Him I could be forgiven. I place my trust in You for salvation. Thank You for Your wonderful grace and forgiveness – the gift of eternal life! Amen! "

( I copy and pasted this from gotquestions.org I feel like they are good and I wanna say I would recommend them for questions about the Bible and I wanna say life in general to from a biblical perspective. )