How can we use type to filter on select option in html

We have a select option in html and having long list by query, can we filter it by typing alphabet?

Do you mean that you want the user to be able to type a letter and then jump in the drop-down menu to the options beginning with that letter? This is a feature of the browser and shouldn’t require anything from your end, besides (I am assuming) alphabetizing the list.

If you have a really long list, I would suggest creating that list as an array in your javascript and using that array to create the options, rather than writing out every single option in your html. So, make an array [opt1, opt2, opt3, etc.]. and then do something like:

const select = document.getElementById("idOfYourSelect")
  let opt = document.createElement("option");
  opt.textContent = a;

If you wanted to perform any other functions (e.g. array.sort(), array.filter(), etc.) you could do those before executing the above code. Hopefully that answered your question!

Better read some tutorials before coding in html as it can get really messy for your code and cause errors from you should avoid to protect your code. If you find it troubling you can try using a software to help you do that. I tend to use checkmarx these days which works fine. You can try.
Anyway, good luck!