Every release has an upgrade guide, like this: https://www.openbsd.org/faq/upgrade74.html
Make backups, make sure you can restore them, then just step through it one version at a time. Things got a lot easier around 6.6 when sysupgrade was introduced.