1 Cor 3: 16 Don’t you know that you yourselves are God’s temple and that God’s Spirit lives in you? 17 If anyone destroys God’s temple, God will destroy him; for God’s temple is sacred, and you are that temple.
In both 1 Cor 3 and 1 Cor 6 there are references to the temple of the Holy Spirit.. However only the second one refers to our bodies while the first is referring to the church. So the second refers to our physical body but this reference to the body of Christ (the church).
The context of 1 Cor 3 is about the church, disunity and division in the church.
What this passage is saying is that if we destroy Christ’s body or church, God will destroy us.