I may be late in here, but found this:
max: Valid for date
, month
, week
, time
, datetime-local
, number
, and range
, it defines the greatest value in the range of permitted values.
maxlength: Valid for text
, search
, url
, tel
, email
, and password
, it defines the maximum number of characters (as UTF-16 code units) the user can enter into the field.
So as I understand here, max is better used for input types related with numbers.
Correct me if I’m wrong.
Here the link:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmax