So my screen broke and i replaced it myself and after i fixed my phone everytime i call someone or they call me i cant hear them unless i put it on speaker does anyone know why this is
While you were inside your iPhone, you may have damaged your iPhone's internal speaker. Since you opened your iPhone, you have avoided any warranty from Apple, therefore, the only possible option would be to open your iPhone again and replacing internal speaker.
I highly doubt this is some software issue for believe this would be your only chance.
i could honestly not care about my warranty since its been gone for over a year and i dont know how to fix the internal speaker so i guess ill be using speakerphone for a while