There is a chance you are mistakeningly entering the child's age on the screen where you are creating the Nintendo Account for the guardian who must be 18 or older.
If you attempt to enter the age of a user aged 12 or under on the account creation page for general users, you will not be able to create an account. However, it will ask if you'd like to have an email sent in order to have a child account created for the child. If you receive that email and already have a Nintendo Account, you can use it to create an account for the child.
If you receive that email and don't already have a Nintendo Account, please start by creating a Nintendo Account for a parent or guardian. At this stage, if you enter an age younger than 18, it will show an error message.