In switch(age), the age expression evaluates to a number.
Your cases (age <= 3) etc. evaluate to booleans (true/false).
You could edit your switch expression to avoid the mismatch,
switch(true) {
case (age <= 3):
return "baby";
case (age >= 4 && age <= 12):
return "child";
...
Also, since you are returning in the cases, so the break isn’t necessary. If you match a case, you return immediately so there is no danger of fall-through. If you weren’t returning, then break would be needed to avoid fall-through.
Furthermore, the specifications mention:
If the number is less than 0 or greater than 140, the program should return ‘This is not a valid age’
Try testing your current program with a negative age. Do you get the expected output?
The cases are going to be evaluated top to bottom. Try walking through your cases from top to bottom with a negative age. If you neither reached the "This is not a valid age" case nor the default case, then you must have matched an earlier case. Think about why that case matched and how you can rectify it.