
Hi @Mateusz Janyszko,
Script editor web part and the Content editor web part are not available in SharePoint modern page. As a workaround, you could use spfx in SharePoint 2019 to deploy css code.
SharePoint 2019 need some diferent version in the document. Please make a reference.
You could deploy the following solution to create a custom webpart which has the same function with script editor.
https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor-onprem
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.