Train or Plane to Osaka

Hi, I know this has probably been asked 1000 times.

We land at HND at 4 pm. We want to head to Osaka right away. Would it be better to fly to Osaka since we're already at the airport or are we better booking the Shinkansen. Plane is cheaper than train.

Thanks for your advice.