Hi @Asher A ,
SharePoint Online modern page doesn't support script editor. So we can return to classic experience or use spfx to add custom script.
If you want to use classic experience. You can just follow the steps
Click list setting >> advanced setting
Then you can add a Script Editor by click Edit Page >> add a web part
Finally post your code to the webpart
If you are using modern page. The only way is to use spfx to insert js and css code. You can refer to following document.
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-framework-overview
https://www.sharepointdiary.com/2020/11/add-custom-css-to-sharepoint-online-modern-page.html
And you can also deploy a Script Editor to sharepoint modern page by following example
https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor
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.