Anonymous41 Xkyer I'm assuming you are 2 different people? Just confirming because it's unusual to have 2 different users have post about very similar issues less than an hour apart. Let's keep this discussion about @Anonymous41 's problem.
Are you using a subfolder, or is Flarum installed at the root of your domain?
If Flarum is at the root, the recommendation is to use the public folder installation and customize your webroot to point to the public folder. This ensures nginx will never serve the folders outside of public.
If you are using a subfolder or cannot customize the webroot, Flarum comes with a config file https://docs.flarum.org/install#nginx that contains the necessary rules to block those subfolders. Make sure the file is loaded and that you un-commented the rules within the file.
When using a subfolder with nginx, what I had done on my own websites is to move the rules inside of my main nginx site file, and modified them to start with the subfolder name. I was not able to get the provided file to work within a subfolder without modification.