If you're worried about vulnerabilities, you'll never buy any CPUs except those that are about twenty or more years old. And maybe not them either.
There are about twenty flavors of the Spectre and Meltdown vulnerabilities now, and invariably specific flavor affect both AMD and Intel, as well as ARM, so you're not going to avoid anything by choosing one over the other in that regard.
There are NO current CPUs coming down the pipeline that will not be affected by one or another of the existing vulnerabilities that have been found. You can just forget the idea that you might find a model that doesn't have exposure to one variation or the other. They don't even have a DESIGN that is unrealized that might eliminate these side channel and simultaneous multithreading vulnerabilities so it's probably going to be a very long time, if ever, before they come up with an architecture that natively negates the potential for this, and even then, there will be something else that WILL, you can be sure.
Buy what you need, keep your data backed up to another device, keep a current system backup on another device, keep your security and antimalware definitions up to date and reduce your exposure by not going places you shouldn't and not opening emails you shouldn't, as well as not connecting devices to your machine you don't know firsthand what is on them, and you will have very little, or greatly reduced, chances of this ever being a problem for you.
Hackers generally want access to corporate entities, or those that offer a big payday. That's probably not you, and if you keep things backed up you will always have a way out of any situation.