You cannot tame an Allay in vanilla Minecraft
Allays are already friendly and will follow the player who gives them an item
Give an Allay an item to make it stay near you and collect matching dropped items
Use a lead to move an Allay if needed
Keep an Allay near a note block to make it drop collected items there
If you want a permanent companion, keep the Allay in a safe enclosed area
