XP is a valuable commodity in Minecraft. It comes organically from killing mobs (or players), making trades with villagers and disenchanting items primarily. It's used for enchanting items, which is very important to progressing in the game.
There's also one other method of acquiring XP, though it's a bit more difficult to come by. Bottles o' Enchanting are essentially free XP for players. Here's the complete guide on that item in Minecraft.
Bottles o' Enchanting: A complete guide to the Minecraft item
A Bottle o' Enchanting is an item that can be acquired in a few ways. When it is obtained, players can throw it on the ground and collect the XP. They can also throw it at other players like a splash potion if they want to give them the XP.
There are only four ways to acquire Bottles o' Enchanting in Bedrock Edition. For Java Edition players, that number drops to just three. For both versions of Minecraft, the cleric villager will give one Bottle O' Enchanting for three emeralds as their level five, or master level, trade.
This is a 100% occurrence. Master level clerics cannot trade anything else. To get a cleric, Minecraft players can place a brewing stand near a jobless villager. Unless it is a nitwit, it will pick that up as its job.
The other ways of acquiring it come from in-game loot. For Java Edition, it can be found in a Pillager Outpost or a shipwreck. It spawns with a 60.9% chance at the outpost and a 14.1% chance in the shipwreck.
For Bedrock Edition, it can also spawn in a Pillager Outpost or a Shipwreck with the same percentages for each one. Bedrock players have the added benefit of an 11.8% chance of it spawning treasure, for which a map can be discovered in a shipwreck, too.
When thrown, Bottles o' Enchanting will drop 3-11 XP, which makes more of an impact the lower a player's level is initially.