Creation date of an entity

Hello everyone
i'm new to this forum.
I'm working on a plugin that allows me to find out who hides the loot behind walls or floors and then use /remove to access them illegally.
The plugin already works very well, but to minimize false positives, I need to know one thing.
Is there a way to know when an entity was created/deployed? Hence its creation date.
I'm looking at bees from my ide but I don't see anything that tells me the age of an entity.
Can someone help me?
A thousand thanks

You could probably use OnEntitySpawned hook, then grab the time and save it into a datafile

Thanks for the answer, is it possible to assign attributes to entities? So I could use the hook and set the date in the entity properties. (attributes)
Thank you