Bismillah,
Asalamu Alaykom,
In order to pray and perform other Islamic rituals one must perform ghusl. However, one can delay performing the ghusl and doesn't need to do it immediately provided that the next salah will not become qada. One may before hand purify their organ to prevent one's clothes or body becoming najis.
May Allah grant you success