Reinstalling should be as simple as copying the composer.json file into a new folder and running composer install again. Once installed (via the admin interface), you can swap the database credentials to your old install and you should get your posts back, but with a fresh source code.
Or alternatively just removing vendor and running composer install in the current project directory. This will be quicker and won't require a separate database, but this won't reset font files for example.
If you touched anything inside vendor you're most likely to continue running into issues forever until you reinstall ?