On the left hand side of your Xcode console, the left hand column has a series of 9 icons at the top. Select the first one (folder icon) then select your project in the file tree below (top blue file). This opens a console in the middle panel with several tabs along the top (you app name, General, Capabilities etc...). Select General and in the panel below in Signing click Automatic Signing then select your Team from the dropdown.
If you don't have Signing panel then you may not have Xcode set up correctly (I'm just guessing) - I'm presuming you do have a developer account with Apple, although I don't know if that would stop the Signing panel from appearing. You may want to ask for help on the Xcode forums: https://forums.developer.apple.com/community/xcode/