in principle trees grow always just up. Only if the tree is pressed by other plants or is in the shade, although it needs a lot of sun (especially with young plants), can the tree begin to tilt shortly after planting.
Here you have two options.
Tip 1: Relocate the tree
Either you implement it again, but this is not recommended as this only means unnecessary stress for the tree, or you tie it up.
Tip 2: tie the tree
To do this, a stable pile should be placed at least 20 centimeters deep in the ground, directly in front of the trunk, but where the wind usually comes from. Now all you have to do is tie the trunk to the post.
The best way to do this is to use natural bast, which is flexible yet stable. Other materials could come loose over time and the tree would grow crooked again. Care should also be taken to ensure that the bark is not damaged. Tied in this way, the tree can stand for a few years until it is strong enough and steered in the right direction.