Welcome to the community!
This has happened to me before, sometimes closing (quitting) and opening Xcode again fixes it
Or building the project Cmd + B