Does eating bad food cause miscarriage?

I eat generally healthy and especially since I’ve found out I was pregnant. I’m 6 weeks.

I’ve kept with a healthy diet and workout at least 3x per week.

I have eaten ice cream daily after dinner for the last 5 days and today at lunch I had a mini personal pizza and a bag of chips. For dinner I want to get penn station which would be a grilled sub and fries.

Can eating this bad cause a miscarriage? I don’t want to do anything that could hurt my pregnancy but I’m craving!

I’ve read things that say a miscarriage is caused by abnormal use and others that say bad food can trigger one.

Any insight?