by and large you can reuse lots of code between iOS and macOS with SwiftUI. There are some differences though. So the 100% wont happen, but you can mostly do it.
Are you using WindowGroups?
One way to narrow this down is to make a new Mac app project or target using the Mac template. Do that in your workspace where you have the iOS code. That should work out of the box and show a working mac app, with a window group and a contentView containing a text priting hello world. You should be able to generate new windows containing this view from the File->New menu item.
From there you can drop your iOS code in and see what compiles or not. Replace the contentView of that app with your own root view, which might well be contentView.
If you are using a sidebar on the iPad it should appear on the Mac version. Mostly things will work, however there are iOS features that are not in iOS and ( to a lesser extent) vice versa. And to get a proper mac app you may have to add some extra menu handling.
To handle this you can add
#if os(macOS)
#else
#endif
around the code to make it compile or to add OS specific features. Most UI should work out of the box though.