The comparison is offered often enough that it deserves an honest answer. Ningaloo and the Great Barrier Reef are two reefs on opposite sides of Australia and they offer meaningfully different holidays.
Ningaloo
Ningaloo is close to the beach. You wade in and you are snorkelling within minutes. The reef is less structurally spectacular than the Great Barrier Reef but the wildlife encounters, particularly with whale sharks between March and July, are more consistent and more intimate.
The Great Barrier Reef
The Great Barrier Reef is a full-day boat trip from mainland Queensland. The visibility on a good day is exceptional. The reef's coral structures are, at their best, the most extraordinary underwater landscapes in the world. The bad days, particularly since 2016, can be sobering.
For a first reef trip, Ningaloo is easier and reliably rewarding. For photographic scale, the Great Barrier Reef, on a good day, has no equal.