Live username availability checking on the registration page is the common feature on most websites.
This will notify the user whether the username is already been taken or not before submitting it.
To do this require AJAX.
Send a request to check the username on the basis of response to perform the action.
In this tutorial, I show how you can check username availability using Vue.js and PHP while inputting.