Experiencing call echo on my iPhone

I currently own an iPhone 15 running iOS 18.3.1 and have been experiencing an echo of my own voice during calls. This issue doesn’t happen all the time but occurs suddenly at random points during a call. Could this be caused by a software issue, hardware problem, or something related to my network service provider?