ALMA-IMF XVII. Census and lifetime of high-mass prestellar cores in 14 massive protoclusters uri icon