The tags field seems to have some manual tokenization, but it's a bit fragile and doesn't happen while you are typing. But UIKit has tokenization: https://developer.apple.com/documentation/appkit/token-field
Although from the aesthetics here I'm guessing you're using SwiftUI, so maybe you want something like this: