You asked:

was ernest augustus younger than sophia of hanover

Yes. Ernest Augustus IV, Prince of Hanover is younger than Sophia of Hanover.
Ernest Augustus IV, Prince of Hanover

Sophia of Hanover
Sophia of Hanover
Sophia of Hanover