Young star clusters are the most common birth-place of massive stars and are dynamically active environments . Here , we study the formation of black holes ( BHs ) and binary black holes ( BBHs ) in young star clusters , by means of 6000 N-body simulations coupled with binary population synthesis . We probe three different stellar metallicities ( Z = 0.02 , 0.002 and 0.0002 ) and two initial density regimes ( density at the half-mass radius \rho _ { h } \geq { } 3.4 \times 10 ^ { 4 } and \geq { 1.5 \times 10 ^ { 2 } } M _ { \odot } pc ^ { -3 } in dense and loose star clusters , respectively ) . Metal-poor clusters tend to form more massive BHs than metal-rich ones . We find \sim { } 6 , \sim { } 2 , and < 1 % of BHs with mass m _ { BH } > 60 M _ { \odot } at Z = 0.0002 , 0.002 and 0.02 , respectively . In metal-poor clusters , we form intermediate-mass BHs with mass up to \sim { } 320 M _ { \odot } . BBH mergers born via dynamical exchanges ( exchanged BBHs ) can be more massive than BBH mergers formed from binary evolution : the former ( latter ) reach total mass up to \sim { } 140 M _ { \odot } ( \sim { } 80 M _ { \odot } ) . The most massive BBH merger in our simulations has primary mass \sim { } 88 M _ { \odot } , inside the pair-instability mass gap , and a mass ratio of \sim { } 0.5 . Only BBHs born in young star clusters from metal-poor progenitors can match the masses of GW170729 , the most massive event in O1 and O2 , and those of GW190412 , the first unequal-mass merger . We estimate a local BBH merger rate density \sim { } 110 and \sim { } 55 Gpc ^ { -3 } yr ^ { -1 } , if we assume that all stars form in loose and dense star clusters , respectively .