R
You find them in cages in pillager outposts and those jail rooms in woodland mansions. Once you have one you can duplicate it with amethyst shards (similar to breeding).
You can right click them with an item and they will hold the item. When they are holding an item from you they will wander around looking for the item they are holding. If they see it dropped on the ground they will pick it up and bring it to the player who initially gave them an item.
Keep in mind they won't wander a very long distance, and no mobs can move outside a certain range of players, world spawn chunks, and chunk loaders. The allay will stay within a certain distance of you so you probably won't lose them very often. However, they often prove very unreliable and aren't used that often outside of the early-game (to gather items such as saplings from a tree farm, or stone from the mines when your inventory is full), or in redstone.
You can "bind" them to a note block if you activate it every few seconds (you can automate this with redstone) in which case they will drop their items next to the note block instead of the player. This has been used in sorting systems with items such as music discs which cannot be sorted using a traditional item sorter. (This is the redstone use I was talking about.)
They can also bring you unstackable items like totems, however if they take fatal damage they would use the totem you gave them, similar to foxes.
A good source of reliable information is the https://minecraft.fandom.com/wiki/Allay
TL;DR: find them in pillager outposts or woodland mansions, they can pick up items for you, or can be used in item sorters with note blocks, but they can be quite unreliable.