404 Template customization | Want 10 recent Post on the 404.php error page apart from the error Notice

The Loop just outputs what is contained in the Main Query, it doesn’t fetch any posts on its own. The Main Query is empty on a 404, so there’s nothing for The Loop to output.

If you want additional content, you have to query for it yourself:

$query = new WP_Query( array('posts_per_page' => 10) );
if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
    get_template_part('content','home');
endwhile; endif;

error code: 523