LOL. Usually it's a long, drawn out process. I can generally tell the nationality of the vessel, and the era in which it was built.
It's pretty easy to get the class. Most ships, planes and land weapons have a certain national style about them even if you can't see a flag or markings. But, after that, many are very similar (for example 8 or 9 gun cruiser classes, destroyer classes, etc.) and you have to look for subtle detail differences. The difference between one cruier and another might be mainly in some small bridge details, or you might be seeing a ship posted from when it was built in 1923 but come across photos of the modified ship in 1940s form and have to know that by the number of AAA or the styple of the masts, radar, etc. It helps having read WW2 coffeetable "weapons" books for avout 35 of my 39 years.
Then I find a listing of ships in the class and search by name and maybe come across a the same picture in the process. But in this case, I entered "Japanese cruiser" on Google, clicked on the first link and saw the same image

Charon