Within the library package, each project exists as a folder with the project name. Inside that folder is a CurrentVersion.fcpevent file which contains several SQLite database tables that hold all the edits for that project.
My first recommendation is make a file-level backup of your current library in case subsequent steps adversely impact that. You can right-click and pick “duplicate”. Obviously this is easier with a “lean library” where media and cache are stored outside the library.
Then in Finder you could do “show package contents”, open the event, and see if your project exists as a folder inside the event (or any other event in that library). If it’s not there that’s why it’s not shown in FCPX.
If you have file-level backups such as Time Machine you could try restoring a previous version of the library, examine it and see at what point the project vanished.
If you don’t have file-level backups, FCPX keeps auto backups of each library, by default located in /Movies/Final Cut Backups. I suggest first making a file-level backup of this entire folder to at least safeguard the current state.
Then within FCPX you could do File>Open Library>From Backups, browse/load each library on the list and see if any contain the missing project. Alternatively at the Finder level you could sort the list of FCPX backups in date order, then do “show package contents” on each one and inspect which has the missing project. Once found you can load that library backup and drag/drop the project to your current library, or just use that library if it is sufficiently recent. Or you could save a project XML file and try to load that in your current library.
The key is go slow and always have (at least one) file-level backup of the library you’re working with. In case something goes wrong you can revert to the previous state. You can rename the file-level library backup or use multiple alphanumeric Finder tags to remind yourself what state the library was in. E.g, “MyLibrary_BeforeLoadingProjXML”.