Link To Child Category For A Post

You can use get_category_link() for that:

$allCat = get_the_category();
if( ! empty( $allCat ) ){
    $lastCat = array_reverse( $allCat );
    $last_cat_link = get_category_link( $lastCat[0] );
    if( ! is_wp_error( $last_cat_link ) ){
        echo '<a href="' . $last_cat_link . '">' . $lastCat[0]->name . '</a>';
    }
}

https://developer.wordpress.org/reference/functions/get_category_link/