Hi @Radu TIRNACOP,
Thank you for posting in this community.
Unfortunately, SharePoint Online doesn't have an out-of-the-box way to set how the edit/new pop-up of a list/document library are displayed at this time.
If this is not an urgent issue for you, I suggest you wait a little while as SharePoint is providing a new experience for lists. This new experience will move the edit/new pop-up to the center.
This will begin rolling out late February 2024.
Because of the way how these features are rolling out, some users may see these features before other users within the same organization.
Hope the information can help you.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.