I think native speakers of the same language can generally develop a good ear for variations in language and achieve passable mimicry of a specific person without an explicit analysis, but that's very hard to teach.
However, I've always found that in all creative endeavors some deliberate analysis makes the identifications of patterns so much easier and therefore easier to imitate correctly. Look for the patterns that reveal an author or creator to be a product of their time and culture, and also what sets them apart.
For example, if you wanted to write music like Bach, it would be good to understand the basics of Baroque music theory, including the limitations of the instruments at the time, the musical scales predominantly used, and the typical rhythms you might hear. Then you would need to know that he is a master of counterpoint, using two contrasting melodies that also harmonize with each other. If you wanted to paint like van Gogh, you should have a basic understanding of Impressionist painting (using distinct brushstrokes or patches of color in combination to evoke an image, in contrast to blending to make the strokes disappear into the realism of the image; accurate depictions of light and color at different times of day was often emphasized), but also know that he painted rapidly, with wet-on-wet, thickly textured, often long brushstrokes of bold color, not blending the colors so much as juxtaposing them to create the vibrant effects he achieved.
Start by looking for technical analyses that have already been written:
Some people have already done this work for you! Reading critical and technical analyses of that writer can be incredibly helpful, if they exist. You are more likely to find these as academic studies of poetry, rhetoric (analysis of famous speeches, particularly), and works considered to be "classics" or masterpieces than you are for very recent authors.
If this intrigues you but you're not having luck with your own author specifically, you can do some digging to identify similar authors and try to find analyses of their work. If you strike out there, too, you can look for technical analyses of any author in the same genre or even the genre itself and see what people have to say about them. This will give you a baseline of related works for comparison and contrast, and it will make your writing and also imitation that much stronger. But that's a lot of work that won't get you all the way to where you want to be. You ultimately need to have or do a study of your selected author.
Do your own analysis:
A more efficient approach, especially if you are already familiar with some aspects of analysis and can't find much on your author, is just to do your own. I'd argue that it would be best to do this AND study someone else's analysis, because it will help you internalize those differences, catch things you might have missed, and make sure you are accounting for details the author of the previous study didn't report on.
Read widely in the author's oeuvre, and consider reading some books by other authors for contrast. All the while, keep coming back to a list of questions about their styles, and note what stands out (including things that aren't on the list!). This worksheet list is a very good starting point: Analyzing the author's craft/style. Another thing to look out for, not mentioned in that list, is unusual repetition of certain words or phrases within a work (Kurt Vonnegut and Toni Morrison do this for different effects).
Some analyses can get much more data-driven, including identifying where verbs tend to fall in the sentence structure (especially in languages where the syntax doesn't strictly dictate word order), and how many words per sentence/sentences per paragraph/letters per word/words per chapter the author prefers. This is more helpful for tasks like identifying or authenticating the author of an unsigned work than for your purposes, but it might help you identify differences in pacing. (or if you were trying to be so authentic as to convince people that it could be real you would want to consider it).
Try writing a passage-- a paragraph or chapter-- that has a very similar structure but perhaps different subject to one that you find exemplifies the author's style. If it's a tense scene from a thriller, cast different characters and give them a different goal. Then go back to your notes about the author and see if they apply to your passage. If not, what needs to change? If the humor doesn't seem right, maybe do a deeper analysis of the types of humor or jokes they write. If the scene drags, see if your author conveys information with fewer sentences, or pushes the tempo with short words.