A text field for a postcode or a price should show a number pad on a phone, not the full keyboard. inputmode is the hint for that.
<input type="text" inputmode="numeric" pattern="[0-9]*" name="pin">
<input type="text" inputmode="decimal" name="price">
The values listed on MDN are none, text (the default), decimal, numeric, tel, search, email and url. numeric asks for digits 0 to 9 only, while decimal adds the decimal separator of the user’s locale, which matters in the Netherlands where that is a comma.
MDN marks the attribute as widely available, working across browsers since December 2021.
The caveat is that inputmode only changes the keyboard. It does not validate anything, and the user can still type letters if the device offers them. Devices also treat it as a hint, so a minus key may or may not appear with numeric or decimal.
When a field really requires a telephone number, email address, URL or search query, MDN says to use the matching type (tel, email, url, search) instead. Type controls validation and meaning, inputmode is for fine tuning. Use type="text" with inputmode="numeric" when you want a number pad but cannot use type="number", for example for codes with leading zeros.
Further reading: MDN: inputmode