It seems like your device might be stuck in headphone mode. Please refer to this article: https://www.headphonesty.com/2020/09/iphone-stuck-headphone-mode/