My 1 month old has been very gassy and is starting to have diarrhea.

He has been crying a lot I don't know what else to do to calm him down. I feel like it's my fault he's having tummy problems. I'm a first time mom so all this is new to me.