@LouisaMf a few things to look at:
Schedule Mode on the project
Task constraint
Task duration
Task predecessors
e.g. if the Schedule Mode is "Start Date" and the project's planned start date is sometime in 2024, with a constraint of as soon as possible, a duration of 2, and no predecessors, your task due date would be 2 days after the planned start date of the project.
or if the Schedule Mode is set to "Completion Date" all tasks will default to on or before the planned completion date of the project, unless that date is adjusted in the Edit area of the project.