Mamas, I need help 😭

Just had my second 5 days ago and I planned to only breast feed with this one. With my first I had to exclusively pump and give formula. Everything went well in the hospital. Latched on good and nursed for 30-45 minutes. Got home and he just acts starved. My nipples are sore and cracking. When he poops it’s barley anything. I’m guessing he hasn’t been latching on good at all. When I pump only an ounce or two comes out. I had to give him formula cause he was hungry and I didn’t know what to do. I feel like crying cause this isn’t how I wanted this to go 😭 I might need to contact a lactation consultant since it’s my dream to breastfeed. I just feel awful and feel like a failure