This is a two part question:
Since the Holy Spirit is God how does he reside within us if God can’t be with sin. If it is because we are redeemed by the cross, then what becomes of mortal and venial sins then?
This topic is one that is often misunderstood. We hear the phrase God loves the sinner but hates the sin. We also heard that our body is the temple of the Holy Spirit.
In my opinion it stands to reason that even though the above are true, it is also true that God is not compatible with sin. Thus when we sin, it causes us to be separated from God. When the Israelites sinned, God was not with them and they lost the battle. When they repented, God was with them and they were victorious.
It is the same with us. We are redeemed by the cross, true, and we should make use of it for the forgiveness of our sins, and God will reside in us. We lose God when we sin, not that He abandons us, but when we repent, in our case by the Sacrament of Reconciliation, we are made right with God and thus be one with Him again.
As for venial sins, we are still in a state of grace but it makes us vulnerable to fall and thus we are in a precarious situation. We need to purify ourselves from them.
If the Holy Spirit is able to reside in us because we are redeemed by the cross doesn’t that make the idea of mortal sin and venial sin null and void?
No, the Holy Spirit would not be able to reside in us due to the presence of our sins. The cross redeems our sins when we repent, that is its purpose.
We are like a vessel. Is it empty or filled with sins? If our vessel is full, then there is no room for the Holy Spirit. Thus we have to empty ourselves so that we can receive the Holy Spirit.
This also explains why Baptism is not a guarantee of heaven. It only is if we are free of sins.