I know that feeling. In order to solve this, you need to implement a divide routine (prints perft for each root move, so you can see which branch has the problem). Then you need to download a robust engine with a divide routine (any engine should be fine). Then, compare the two divide results, pick a move which has a problem, and repeat for that new position (with reduced depth). This lets you follow the path until it happens at depth 1, which will show you the wrong move. Of course, once you see the specific wrong move, you can investigate why it's happening.I feel completely lost and need help
Since your engine can't input moves, but only read FEN positions, you'll probably also want a GUI which can output a FEN for a given position, so you can paste those into your engine. You'll probably also want to update your engine so you can paste in a FEN and depth, instead of recompiling for each new position.