Morning,
You can upgrade to directly to UR5. Each of the update rollups are cumulative. Simply means you do not have to apply them in order, you can just install the latest update, or in your case, UR5.
https://kevinholman.com/2023/04/19/ur5-for-scom-2019-step-by-step/
Please read the Know Issues section before you start. Remember to backup any files you are going to edit before editing them.
Issue #1. You may not see three "sandbox" words during the search of the "main.js" file, only two. If that is the case, edit the second as mentioned in the text of the issue.
There is also a "Hotfix" available for Linux if you monitor that in SCOM: KB5028684
Hope this helps,
Tony