Salvation is only given when a person that believes in the Gospel, the death, burial, and resurrection of Jesus Christ, confesses that they are depending on Him alone to save them. “That 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. For with the heart man believeth unto righteousness; and with the mouth confession is made unto salvation.” - Romans 10:9,10.

Getting baptized is merely a public profession that you have accepted Jesus Christ as your Savior and are depending on Him alone to take you to heaven. Yes, it is wise to get baptized after you are saved, Jesus got baptized and He had no sin, but there is no requirement to get baptized in order to keep your salvation or wash away your sins like some people teach.

Salvation reconciles us with God, it does not make us sin free, just justified, or forgiven. “But now the righteousness of God without the law is manifested, being witnessed by the law and the prophets; Even the righteousness of God
which is by faith of Jesus Christ unto all and upon all them that believe: for there is no difference: For all have sinned, and come short of the glory of God; Being justified freely by his grace through the redemption that is in Christ Jesus: Whom God hath set forth to be a propitiation through faith in his blood, to declare his righteousness for the remission of sins that are past, through the forbearance of God; To declare, I say, at this time his righteousness: that he might be just, and the justifier of him which believeth in Jesus.” - Romans 3:21-26.

Yes,
there are verses in the Bible that reference getting saved and baptized at the same time that can be confusing to those who do not understand the Bible, such as this one, “He that believeth and is baptized shall be saved; but he that believeth not shall be damned.” - Mark 16:16. The key to understanding that baptism is not necessary for salvation is in the second part of the verse, “He that believeth not shall be damned”, Jesus did not say, “He that believeth not and is not baptized shall be damned”, He only said, “He that believeth not shall be damned”.

Perhaps the biggest form of proof found in the Bible that baptism is not required to be saved is when Jesus was being crucified. Two men were with Him, one on each side of Him. One man mocked Jesus the other believed in Him, was saved, and joined Him that day in heaven. “And one of the malefactors which were hanged railed on him, saying, If thou be Christ, save thyself and us. But the other answering rebuked him, saying, Dost not thou fear God, seeing thou art in the same condemnation? And we indeed justly; for we receive the due reward of our deeds: but this man hath done nothing amiss. And he said unto Jesus, Lord, remember me when thou comest into thy kingdom. And Jesus said unto him, Verily I say unto thee, To day shalt thou be with me in paradise.” -Luke 23:39-43.