the ipv4 is last so long because of approaches, the private ip addresses where a range of ip addresses used in a local network, and the second approach is NAT, network Address translation where a one public ip address can represent a thousands of ip addresses in the network instead of assigned each network a single public ip addresses.
secondly the ipv4 is not sustainable because of
1- Exhaustion of IP Addresses: where the 32 bit for 4.3 billions is not enough due to the increased number of internet users and the connection of the machines to the network.
2- NAT has some drawbacks like security and end to end connectivity, because with NAT it is hard to track anyone in the Network.
3- lack of scalability: with the growth of the internet, especially with the rise of IoT devices which require millions or billions of IP addresses, which means that IPv4 cannot support the scale needed for the future of the internet.