adding class to excerpt

the_excerpt() function bascially echo(es) the get_the_excerpt() function output, which in turns wraps the $post->post_excerpt value in html <p> tags.

So you can either strip the html markup,

<p class="myclass"><?= wp_strip_all_tags( get_the_excerpt(), true ) ?></p>

or, if you have access to the $post object simply,

<p class="myclass"><?= $post->post_excerpt ?></p>