That is not true entirely however consideration has to be given to environmental, societal, traditional and cultural factors according to each era with the change of times. If for e.g a girl becomes fully mature and is capable of getting married let’s say at the age of 14 and it’s culturally accepted within a particular set up then Islam allows it if otherwise Islam prevents it