Why HTML element is not being rendered after using fetch in ejs?

<%let urlDetails = `https://www.youtube.com/oembed?url=${list[0]}&format=json`;%>
    <%let response = await fetch(urlDetails);%>
    <%let data = await response.json();%>
   <% console.log(data.title) %> 
   <div class="card">
       <div class="title"><%= data.title %></div>
   </div>
 <%} %>

when you console log data is present but

<div class="card">
       <div class="title"><%= data.title %></div>
</div>

this div element is not shown in page