Hello,
It’s related to Nginx settings that your server has. If you change the permalinks settings to Post name you need to configure Nginx settings after that. So, contact your hosting provider to get help with this.
Regards