I fixed it
So the fix is: I deleted everything and reinstalled it again for the 20th time.
And I installed it with composer create-project flarum/flarum
,
then I cleared my server cache and reset my DNS settings. Idk why, but it helped. Now I have to configure the DNS again, but it was worth it. Now the mail function is working fine with the rest of it.
i also didn't need to add stuff to the config.php
Thx for the helps in this post i hope someone will not have the same problem as me