I would recommend multiple steps -- this may be required anyway if your device made a transition to DSA or had partition size changes.
Your configs will not be compatible from 18.06 to 23.05, so you'll be configuring from scratch after the upgrades are complete.
See this thread for a similar conversation:
2 Likes