The display of a dropdown without optgroups is defined:
{% set field = craft.app.fields.getFieldByHandle('<FieldHandle>') %}
<select name="fields[<FieldHandle>]">
{% for option in field.options %}
{% set selected = entry is defined
? entry.<FieldHandle>.value == option.value
: option.default %}
<option value="{{ option.value }}"
{% if selected %}selected{% endif %}>
{{ option.label }}
</option>
{% endfor %}
</select>
The following error occurs:
Key "default" for array with keys "optgroup" does not exist.