In SharePoint online modern page, for security reasons, modern web parts do not allow for the insertion of code like JScript. But you could add Modern Script Editor web part by adding an app.
1.Settings > add an app > Modern Script Editor web part by mikaelsvenson
2.Remember allow Custom Script in Classic SharePoint admin center > setting > Custom Script
3.Then you could add Modern Script Editor web part
4. As a workaround you could use the following JS code to refresh the page every 1 minute
If an Answer is helpful, please click "Accept Answer" and upvote it.
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.