I contacted potential supervisor A (UK university), and A told me he is not sure whether he could supervise me. He copied my email to potential supervisor B (UK university), and the very awkward thing is that B has already rejected my application before I contacted A. So awkward! What should I do? Do I need to send an email to A to say something?
I disagree that this is all that awkward: students are expected to correspond with multiple professors looking for a PhD position, and most of them will not have space for the student or will choose someone else (or the student will!). In this situation, both supervisor A and the student thought supervisor B might be a good fit for the student's interests - that validates both supervisor A forwarding the message to B and the student's original contact to B.
I think it's fine to do nothing, but I think it would also be fine to reply-all to the email thread between professors A and B and say both 1) a brief one-sentence 'thanks' to A for considering you and for helpfully suggesting professor B, and 2) acknowledge briefly (one sentence) that you've already heard from professor B that they do not have a position for you.
This accomplishes two things at once: it shows you are gracious, as you'd like to be seen by both A and B as they are professors in your field and will be your peers in the future if your plans work out, and it lets professor B off the hook for needing to respond to A.
No need to apologize for awkwardness or go overboard. Focus your remaining energies on other opportunities.
It could be that A was not aware that B had already rejected your application. So, maybe, A was trying to help you by forwarding (CC) your email to B to see if B is interested in being your supervisor.
For now, it seems that both A and B have rejected your request to be your supervisor. Is it true ?
If yes, then you should probably move on and look for a different supervisor. There is no need to talk to A about the fact that B already rejected you.
Person A has not rejected you. They were, perhaps, trying to be helpful, possibly thinking B would be a better choice. While the situation seems awkward to you, it may not seem so to them, if they are friends/colleagues.
Person A hasn't said why (unless you omitted it) that they "may not be able" to supervise you. Perhaps it had to do with themself, not with you. Perhaps they could change the balance. If they hadn't seem something positive in your request, then they wouldn't have passed it on.
I would continue to try to get A to supervise you, provided that you believe they would be a good choice for reasons you've looked in to and not just a random ask. Give them a good reason to overcome their potential reluctance.
But, pursue all other options in tandem. There is no reason to step back from other possibilities.