The functions you are looking for, are:
the_post_thumbnail_url(); // For featured image
the_author(); // For author name
get_author_posts_url(); // For author link
the_date(); // For post's date
So, your code should be something like this:
<div class="cs-post-carousel-layout">
<div class="cs-container swiper-container">
<div class="swiper-wrapper"><?php
// define query arguments
$args = array(
'posts_per_page' => 5, // your 'x' goes here
'nopaging' => true
// possibly more arguments here
);
// set up new query
$tyler_query = new WP_Query( $args );
// loop through found posts
if ($tyler_query->have_posts()) {
while ( $tyler_query->have_posts() ) {
$tyler_query->the_post();
//Post item -->
?><div class="swiper-slide">
<div class="cs-post-item">
<div class="cs-post-category-icon">
<a href="https://wordpress.stackexchange.com/questions/269933/<?php the_permalink(); ?>"></i></a>
</div>
<div class="cs-post-thumb">
<a href="<?php the_permalink();?>"><img src="<?php the_post_thumbnail_url();?>" alt="<?php the_title();?>"></a>
</div>
<div class="cs-post-inner">
<h3><a href="https://wordpress.stackexchange.com/questions/269933/<?php the_permalink(); ?>"><?php the_title();?></a></h3>
<div class="cs-post-meta cs-clearfix">
<span class="cs-post-meta-author"><a href="<?php echo get_author_posts_url(get_the_author_meta('ID'));?>"><?php the_author();?></a></span>
<span class="cs-post-meta-date"><?php the_date();?></span>
</div>
</div>
</div>
</div><?php
}
}
// reset post data
wp_reset_postdata();?>
</div>
</div>
</div>
I also reformatted your HTML code for you, and added indentation.