Yoast Metadata API to adjust/override the meta description

I think you’re on the right track here. You can use the wpseo_metadesc filter to alter the meta description any way you want. Check out below code, maybe it’ll help you with your function.

add_filter( 'wpseo_metadesc', 'my_custom_meta_description' );
function my_custom_meta_description($description) {
    if ( !$description || empty($description) ) {
        global $post;
        $content = get_the_content($post->ID);
        if ( $content && !empty($content) ) {
            $description = substr($content, 0, 160);
        }
    }
    return $description;
}

I haven’t tested the function so you may need to customize it for your need.