Change Title Based on Taxonomy Filter in archive-{cpt}.php

I’ll answer this question myself since I found the solution after consulting with my programmer friend.

Basically the code above that I posted is wrong, turns out I shouldn’t be using get_the_term_list but to use get_query_var instead.

The final code is to replace the above code I posted with these code:

EDIT: Change few things to call proper “taxonomy name” as taxonomy slug can be different with taxonomy name. Credit @Milo.

<?php
// get the currently queried taxonomy term, for use later in the template file
$kendaraan = get_query_var('kendaraan');
$merk = get_query_var('merk');
$seat = get_query_var('seat');
$kendaraan = get_term_by( 'slug', $kendaraan, 'kendaraan' );
$merk = get_term_by( 'slug', $merk, 'merk' );
$seat = get_term_by( 'slug', $seat, 'seat' );
?>

<h1 class="archive-title">Rental 
<?php if ( empty( $kendaraan ) && empty( $merk ) && empty( $seat ) ): ?>
Mobil, Bus, & Motor - TravelBos.id
<?php else: ?>
<?php echo $kendaraan->name; ?> <?php echo $merk->name; ?> <?php if (!empty($seat)) {echo "(". $seat->name .")";} ?> - TravelBos.id
<?php endif; ?>
</h1>

Now this code will make it possible for the H1 archive heading to change based on the taxonomy being filtered when viewing that particular archive page.

Hope it helps anyone who has the same problem as me.