Separating juvenile night-herons is a greater challenge.
Compare these two images of the night-herons at rest.
Immature Black-Crowned on the left has a yellow and black bill. The Yellow-crowned on the right has a primarily dark bill.
The Black-crowned has a more "pointy" bill than the Yellow-crowned.
The Black-crowned has more spots on the wing and back than the Yellow-crowned.
In flight... Now compare the two species in flight. The feet on the Black-crowned (left) barely extend beyond the tail, while the feet on the Yellow-crowned, extend well beyond the tail. Note the white spots on the Black-crowned on the left are much reduced from the image above, and closer to those of the Yellow-crowned on the right.
The image is as large as possible for study. Which species do you think it is? It has lots of white spots on the wings and back. The bill looks pale at the base, almost like a Black-crowned? How about the long legs?
What did you decide?
It often takes a combination of characteristics to make a proper identification.
In this case you might have noticed the shape of the bill and the long legs.
While the bird has plenty of white spots on the wings and back they are generally smaller and shapped differently than those on a Black-crowned.
A pretty good indication this is a Yellow-crowned Night-Heron.