Paul advertises free lifetime updates for his books, and says this applies to purchases from Gumroad and Apple's Book Store:
https://www.hackingwithswift.com/update-policy
Like you, I purchased "Hacking with MacOS" before the SwiftUI edition was released. Although the SwiftUI Edition of this title is a separate book, I'm happy to report that Paul includes both the original AppKit and the new SwiftUI editions at no additional cost.
If you had bought the book through the Store link on this website, which links to Gumroad, you would have found all updates of both editions available for download in perpetuity, including newer versions as they are released. However, I don’t know how Apple's Book Store handles two books sold for a single price. Also, for books other than Paul Hudson's, I've found that Apple often fails to update a book when updates are released.
To replace your current AppKit edition with the latest version of both the AppKit and SwiftUI editions, I recommend you try the following: In the Books app, click the "3 dot" menu adjacent the Hacking book, select Remove, then select Delete.
Now search for the same book in the Apple Book Store. Because you already purchased it, the Buy button will show Get or Read instead of the price. Hopefully you will be able to get both the SwiftUI and AppKit editions of "Hacking with MacOS" this way.
If that doesn’t work, email Paul Hudson.
If you decide to buy any additional Hacking books in future, I encourage you to use the Store link on this website to buy through Gumroad instead of the Apple Book Store.