Minecraft does not have generic support for scheduling things.
There is special support for things like playing sounds, mob effects (e.g. potions wearing off) and scheduling block/fluid ticks (e.g. delayed spread of liquids).
For other things you need to code it yourself.
You definitely don't want to do things with threads, including sleeping. You will just break things.
First you need to remember your data somewhere that is relevant to what you are doing, e.g. setting the countdown to the event in a Player capability.
https://forge.gemwire.uk/wiki/Capabilities
Then you subscribe to the relevant tick event, e.g. PlayerTickEvent which will decrement the countdown and does the processing when it reaches zero
You can see this kind of processing in many places in vanilla, e.g. Entity.remainingFireTicks, Entity.portalTime, LivingEntity.removeArrowTime, etc.
Pay attention to the side (client or server) and phase (start or end of tick) of the tick event, so you are processing things in the correct place.