I figured out the issue by myself. I tried contacting the support, but they also don't know the actual meaning behind the error codes, leaving me to find my own answer.
Things I already tried by looking on the internet:
Deleting Cache, rendered files.
Creating a new Library and copying all the Events and Project without media and then relinking media.
Relaunching my Finder and then First aid my External hard drive.
Re recorded the footages 5-6 times.
After doing all these, I noticed that the video was not so smooth during playbacks in the app. So I figured out that there might be some issue with the video encoding itself. Even tho it is at the highest quality and its a mov file, still the code or something inside it was making FCP struggle with playbacks and exports. I put the videos in Apple Compressor app, then converted them in their own resolution, which also helped me to reduce the file size without any noticeable quality compromise.
And that's it. The exported files from compressor worked like a charm!