Luck is a property in Minecraft that makes it more likely to obtain higher quality items from activities such as fishing. This potion has the same basic effect as using an enchanted fishing rod that has the luck of the sea property assigned to it, but the only way to get the actual luck status effect is to drink one of these potions.
How to Get and Use Potion of Luck! (Java Edition) | Easy Minecraft Tutorial
Since there is no recipe to brew a lucky potion in Minecraft, the only way to obtain one in survival mode is to enable cheats and then enter a specific console command. Here's how to give yourself a lucky potion in Minecraft:
Type / to open the console.
Type the full command /give @p potion{Potion:"minecraft:luck"} 1 and press enter.