How to set up Xcode for Unreal Engine?

I apologize in advance becaus I am a newbie, but I hope that you all will be willing to help me. I was wondering if someone could explain to me how to set up Xcode with Unreal Engine, or at least point me to a tutorial that would tell me how to do this. Since I use a Mac, I have to use Xcode to program for UE4, and I downloaded Xcode, but when I go to create a new C++ UE4 project, I get a message saying that I can not create the project until I install Xcode, but it is already installed onto my computer. Why is this? I have very little experience coding, but I would like to learn more while I use UE4, and this is my first time ever using Xcode. I would love some guidance here! I have searched multiple times on what to do here but I haven’t been able to find an explanation anywhere on how to set it up. Anyone know how this is done? Any help is hugely appreciated, and thank you in advance!!

Never mind! I figured it out. I downloaded too late of a version of Xcode to work with Unreal Engine. All is good now!