I think you can phrase it as a question.
Ex: hey, I noticed you’ve been a bit irritated or upset by me when we talk nowadays. I feel like I’m losing you. Did I do something or is someone going on?
You can also verbalized that you value the friendship in the conversation.
Ex: Our friendship is important to me so I wanna work this out, but *......