It has long been a Catholic understanding that when circumstances prevent one from receiving Holy Communion, it is possible to make an Act of Spiritual Communion which is a source of grace.
Spiritual Communion means uniting one’s self in prayer with Christ’s sacrifice and worshipping him in his Body and Blood. The most common reason for making an Act of Spiritual Communion is when a person cannot attend Mass.
Acts of Spiritual Communion increase our desire to receive sacramental Communion and help us avoid the sins that would make us unable to receive Holy Communion worthily.
A prayer for Spiritual Communion
My Jesus, I believe that you are present in the Most Holy Sacrament.
I love you above all things and I desire to receive you in my soul.
Since I cannot at this moment receive you sacramentally,
Come at least spiritually into my heart.
I embrace you as if you were already there
And unite myself wholly to you.
Never permit me to be separated from you.
Amen.