I'm familiar with the band Ghost as I'm a die-hard Mercyful Fate and King Diamond fanatic and Ghost are often compared to those two bands in terms of style. If you wanted to write a book and sound like Cormac McCarthy, you'd likely need to be familiar with his work, that's Number One, but you'd also need to know who and what influenced him. You can't expect that you're just going to sit down at the typewriter and churn out something that reads as if he wrote it if you don't know how he came to form his style to begin with. If you want to write music that sounds like a certain artist, you've got to do your homework and find out what influenced them to play in that style. If you learn how to play ten Ghost songs on the guitar, you'll be able to see the basic building blocks. What key signatures do they like to use the most? How are their songs arranged? Do they follow the basic intro - verse - chorus - verse - outro that so many bands use or do they like to mix it up a bit?
I love Mercyful Fate and King Diamond, but most of the riffs to the songs I've written don't sound anything like Mercyful Fate and King Diamond. Why? Well, because those guys are a lot older than I am and they were listening to bands that were around before my time. And even in the cases where we share common influences such as classic Judas Priest, that's just not enough to make up for all of the differences. I like The Scorpions and UFO and Uriah Heep, but they're not my favourite and they didn't have a very big impact on my playing. If you want to sound like Ghost, then you'll need to look into the influences that helped formulate their sound and style.
But in all honesty, it's silly to want to emulate a band to the point where you sound just like them. You could be a very talented player, but I'm guessing that the guitarist from Ghost is much better because you want to emulate him and he doesn't have the slightest interest in sounding like you. Why would I want to listen to a band that tries to sound exactly like Ghost when I can just listen to Ghost if I want to?