Hello morettina98,
Thank you for contacting Apple Support Community! I see your iPhone seems to be having issues with rotating the screen between portrait and landscape orientation, being able to use this feature is important in your iPhone 8.
To be able to isolate the issue if its hardware or software I always follow these steps in the following articles to get a clear view for next steps.
First I will follow the steps on this article to make sure the portrait orientation is turned on or off, Rotate the screen on your iPhone or iPod touch
Second I will follow the steps on this article to restart the device, Restart your iPhone
Third when restart does not fix the problem I use the steps in this article for hard rebooting the iPhone, for your iPhone 8 it will be this part "iPhone 8 or later: Press and quickly release the Volume Up button. Press and quickly release the Volume Down button. Then press and hold the Side button until you see the Apple logo." If your iPhone, iPad, or iPod touch won't turn on or is frozen
Take care!