Paraphrasing the above....
As it is - definitely no good. You need an additional spacer.
Your new stem is slimmer, vertically, than your old one, so you need to add another spacer, either above or below the stem, so that the top cap compresses against the spacers. Watch a YouTube video on what to tighten, how much, and in what order as that's much easier than trying to describe everything in text. GCN have a good one on headset adjustment.