Look that the image and you know what i want to say I made custom entity class but when i spawn it, the npc stuck under block (
Then it's due to not adding the base offset. A player's base offset is 1.62 by default. Add that to the Y axis.
That's what Muqsit suggested. Offsetting means to always have the Y value 1.62 blocks higher than whatever y value the entity is actually at, so it raises it by that much when it moves.