URGENT NEED TO ADD TAGS TO DYNAMIC PAGE

So I tried using this code, but the tags are altogether any idea how to fix it? I want them to show separately. Below the code example that actually worked on the repeater. Thank for your help!

$w . onReady ( function () {

let tags = $w ( “#dynamicDataset” ). getCurrentItem (). tags ;

let  tags  =  itemData . tags ; 

let  tagsHtml  =  tags . map ( tag  => 
        `<span style="background: #f44336;  
    border-radius: 5px;  
    line-height: 2.6;        
    padding-top: 5px;  
    padding-bottom: 5px; 
    padding-left: 5px; 
    padding-right: 5px; 
    margin-left: 0px; 
    margin-right: 0px; 
    text-align: center; 
    color: #ffffff;  
    font-weight:900; 
    
    font-size: 12px"> ${ tag } </span>` ) 
    . join ( '  ' ); 
$w ( '#tagsDisplay' ). html  =  tagsHtml ; 

});

The one that worked!

$w . onReady ( function () {
$w ( “#dynamicDataset” ). onReady ( function () {
$w ( “#repeater1” ). onItemReady (( $item , itemData ) => {

        let  tags  =  itemData . tags ; 

        let  tagsHtml  =  tags . map ( tag  => 
                `<span style="background: #008AFC;  
    border-radius: 5px;  
    line-height: 2.6;        
    padding-top: 5px;  
    padding-bottom: 5px; 
    padding-left: 5px; 
    padding-right: 5px; 
    margin-left: 0px; 
    margin-right: 0px; 
    text-align: center; 
    color: #ffffff;  
    font-weight:700; 
    
    font-size: 12px"> ${ tag } </span>` ) 
            . join ( '  ' ); 
        $item ( '#tagsDisplay' ). html  =  tagsHtml ; 

    }); 
}); 

});