Reading Japanese names is more tricky than reading regular words because in addition to 音読み and 訓読み readings, in Japanese names 名乗り readings are also used. So if you have never practiced reading names, often you may be lost. Even Japanese people oftentimes are not able to know with certainty how a name is going to be read like.
In addition, it's not uncommon for a name to be read many ways. For example, you can read 幸子 as ゆきこ, さちこ or こうこ; 裕子 as ゆうこ or ひろこ; 晶子 as あきこ or しょうこ. With regular words this doesn't happen so often. Words like 経緯 which is read けいい／いきさつ or 故郷 which is read こきょう／ふるさと are rather exceptions.
So how do you learn names? Practice in Anki, of course. Make an Anki deck and fill it with Japanese names. The deck could include names of celebrities, politicians or even anime characters. Most anime characters have normal Japanese names unless it's a weird fantasy show.
On the front of the card you'd have the name itself written in kanji. On the back put the name with furigana. A photo and some basic information about the person would be nice to have on the back as well.
Don't make cards for random people, instead add names of people you've seen or heard of a few times before. This is going to ensure that the names are somewhat frequent.
Also, don't make cards for just a name or just a surname.
Any given name or surname can have a number of different readings.
Only a concrete person can have their name read only one way.
For example, the name
福沢諭吉 identifies a real person and has only one correct reading.
Through learning lots of names you're feeding your brain input, creating a bank of names, training a neural network in your brain. You start seeing patterns. So next time you see a new name, you can take a more correct guess.