Apologizing is a thoughtful way to address the situation and show your crush that you're considerate of his feelings. Here's a suggestion for what you might say:
"Hey [Crush's Name], I just wanted to reach out and apologize for what happened. My friend prank called you, and I want you to know that I didn't approve of what she said. It was really rude, and I'm sorry if it made you uncomfortable. I value our connection, and I hope we can move past this. You’re a great person, and I’d love to get to know you better."
Feel free to adjust the wording to make it sound more like you! Just be sincere and express how much you value him. Good luck!