The default post excerpt length is 55 words in WordPress.
You can use the WordPress filter ‘excerpt_length‘ to change the default excerpt length. It allows you to filter the maximum number of words in a single-post excerpt.
php
/**
* Change Post Excerpt Length
*
* @param int $length
* @return int
*/
function maverick_change_post_excerpt_length($length)
{
return 20;
}
add_filter('excerpt_length', 'maverick_change_post_excerpt_length', 999);