Sometimes you want suggestions but not a strict dropdown. The datalist element does that in plain HTML, with no script.
<label for="flavor">Choose a flavor:</label>
<input list="flavors" id="flavor" name="flavor">
<datalist id="flavors">
<option value="Chocolate"></option>
<option value="Mint"></option>
<option value="Vanilla"></option>
</datalist>
Give the datalist an id and point the input’s list attribute at it. The browser shows the options as suggestions while the user types, and picking one fills in its value.
It works for text-like types such as text, search, url, tel, email and number. It can also offer values for date and time inputs, tick marks on a range, and colors for a color input.
The caveat is that it is not a replacement for <select>. The user can still type anything that passes validation, so check the value on the server. MDN also lists accessibility problems: the option text does not scale with page zoom, the options can hardly be styled, and some screen reader and browser pairs, such as NVDA with Firefox, do not announce the popup. The feature is also not Baseline, so look at the compatibility table on MDN before depending on it.
Further reading: MDN: datalist