4 month old has really bad rash due to diarrhea / constipation

3👼🌈💖2018🌈💙2020💖2021💙2023 • God's timing is perfect🙏⛪

So my son has developed a really bad rash due to constipation but also diarrhea it's really hard for him to poop but when he does it's really watery sometimes a lot and sometimes little to none he also has a runny nose his doctor said it is a virus and I have been putting ointment and diaper rash cream on his bottom and it is not helping any suggestions would be awesome thanks in advance