If one intends to do good but is unable, he is counted among the ones able to do it in spirit
We were with the Prophet ﷺ on an expedition. He said: There are some people in Medina. They are with you whenever you cover a distance or cross a valley. They have been detained by illness.
كُنَّا مَعَ النَّبِيِّ ﷺ فِي غَزَاةٍ فَقَالَ: «إِنَّ بِالْمَدِينَةِ لَرِجَالاً مَا سِرْتُمْ مَسِيرًا وَلاَ قَطَعْتُمْ وَادِيًا إِلاَّ كَانُوا مَعَكُمْ۔ حَبَسَهُمُ الْمَرَضُ۔»