I say don't bother. While the SwiftUI framework makes things that resemble an OutlineView, they fall very very far short of the flexibility offered by the Appkit and UIKit frameworks.
Notably, if you want users to be able to rearrange the items between parent / grandparent items, beware. You will not be able to do so in a way that users find intuitive, if at all, in pure SwiftUI.
I requested the ability to be able to drag items from one SwiftUI ForEach to another after WWDC22 revealed no improvements. (FB10064943). For me, this inhibits making a rock-solid sidebar, and while the TabView APIs this year get closer, they come with other design baggage I'm not sold on yet.
If you've already got an AppKit implementation, just drop that into SwiftUI land via the representable APIs. There are many places in SwiftUI that will get you 80% of the way to a great user experience, but the other 20% requires a fully bespoke solution that won't resemble the system provided UIs or support accessibility considerations.
Why it's taken over 2 years to add the ability to drag things between sections I'll never know. Probably deprioritized.