Internet gateway is used to connect a vpc to the internet and NAT gateway is used to connect the Private subnet to the internet(which means what ever traffic is coming to private subnet instance which will forward to the NAT gateway). you need to forward the traffic in the route table to NAT
Route table
0.0.0.0/0