Spiritual death precedes physical death. God told Adam that when he ate from the restricted tree he would die Gen 2:17.  He didn’t die bodily at this point because he lived to be 930 years old  before he died physically Gen 5:5. He died spiritually, which means he was separated from God Gen 3:23,24. Adam was one with the Lord as God breathed the breath of lives (the Hebrew word “hayyim” is plural) into him, physical and spiritual Gen 2:7; Jn 20:22 (the Holy Spirit). All of mankind has experienced this spiritual death Eph 2:1,2,3 and unless we are raptured all will experience physical death Heb 9:27. Those that did not believe in Christ will be separated for eternity while believers will be with God forever Mt 25:46; Rev 21:3,4. Physical death is the spirit leaving the body Jas 2:26, while spiritual death is the Holy Spirit leaving man’s human spirit 1 Co 6:17; 1 Co 2:14. This has only happened twice, to Adam Gen 3:23,24, who was disunited or separated because of his sin Gen 3:6; Isa 59:2; and to Jesus Mt 27:46, who was disunited from the Father because of our sin 1 Pe 3:18 but was reunited to the Father when He gave up His spirit dying physically but alive spiritually Lk 23:46 whereas all other men have been born without the spirit Ps 51:5; Eph 2:1,2,3.

Jesus also experienced spiritual and physical death. He underwent spiritual death for three hours with darkness depicting separation from God Mt 27:45. He refused a sedating drink to remain in full control of his mind Mt 27:34. However, when He had fully suffered spiritually, Jesus cried out, “My God, My God why have You forsaken me” Mt 27:46. Jesus then took a drink and said, “It is finished” then gave up His spirit, dying physically for our sins Jn 19:28,29,30. 

John baptized Jesus to demonstrate a spiritual truth. Jesus was already righteous  and John recognized this fact Mt 3:14; yet Jesus said it would fulfill all righteousness Mt 3:15. Baptism would be a picture of the Good News: Jesus going under the water to die in our place and bury our sins in the depth of the sea Mic 7:19 and then be resurrected to new life. The Gospel is outlined by Paul as Jesus’ death, burial and resurrection 1 Co 15:2,3,4.

So, all are commanded to be baptized Mt 28:19, to illustrate that we have died to our self-rule as we enter the water receiving the forgiveness of sins Eph 1:7, and then being resurrected to live a new life Ro 6:4 where we submit to the authority of Jesus Gal 2:20.

Ro 6:4