Try this PHP Snippet:
add_filter( 'generate_post_date_output', function( $output, $time_string ) {
$time_string = '<span class="date-label">Published on: </span><time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>';
// Check modified date is newer thant published
$updated_time = get_the_modified_time( 'U' );
$published_time = get_the_time( 'U' ) + 86400;
// If modified date exists then ouput both time strings with modified date
if ( $updated_time > $published_time ) {
$time_string = '<span class="date-label">Updated on: </span><time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">%4$s</time>';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
return sprintf( '<span class="posted-on">%s</span> ',
$time_string
);
}, 10, 2 );