Baptism is not the effectual act that removes sin. Baptism is as a result of being saved.
Jesus said you must be “born again”. This is the spiritual regeneration that happens when you accept Christ’s free gift of salvation. Of course a true believer will want to do what his Lord desires after acknowledging His Lordship.
For example, why would a person who does not believe be baptized? Maybe social pressure, family expecting it, etc. In that case, they view it as a nothing. For those who believe that the Baptism is the regenerative aspect (or remission of sin) then would the unbeliever who undergoes baptism be forgiven?
You handle is TrustAndObey. Trust comes first. Obey is second. Obeying is getting baptized. Trust is accepting Jesus.