since in the comments you explained by dynamically you mean without reloading/refreshing the page.
the answer to the first question is: yes, you will use AJAX calls.
first, create the search input
<input name="input_name" placeholder="<?php echo __('search','textdomain'); ?>">
second, the Javascript registered and enqueued script in functions.php
(function ($) {
$(document).ready(function () {
$("[name=input_name]").keyup(function () {
$.post(
ajaxurl,
/*
if ajaxurl is not defined you need to use wp_localize_script()
or depending on how your wordpress is hosted use simply admin-ajax.php
*/
{
action: "random-name",
search_data: $(this).val(),
},
function (response) {
// use "response" to draw the new table rows
}
);
});
});
})(jQuery);
finally in your functions.php
function my_ajax_handler(){
$_POST['search_data']; // here the searched word, push it to $args then run the loop Query again
wp_die();
}
add_action('wp_ajax_random-name','my_ajax_handler');
keep in mind there are existing plugins for tables. but doing an AJAX call yourself shouldn’t be that hard.
the code above does the task.