Joomla 4 needs at least PHP 7.2, which is a newer version of PHP than what Joomla 3 requires (5.6).