IP is used to get network configuration details, ip is the current configuration tool. ifconfig is also used to fetch network configuration details but this older command has been used in many versions of Unix for decades but is less capable as compared to ip. Certain distribuitions don't even include if config by default.
The ip command is a modern and more versatile network configuration tool compared to the older ifconfig command. It provides a broader set of functionalities for configuring and managing network. Command ip is more consistent across different Linux distributions and is the preferred choice for modern network setups.
The "ip" command's output contains details from internet layer and physical layer.The ip command is the current standard network configuration tool, the "ifcong" command used in many older Unix version but it is less capable.For consistency with contemporary recommended practice and distribution which does not include Ifconfig by default, "ip" command is used