Sweeping Edge is a special enchantment for your sword in Minecraft, and if you want to get it, you'll need to either enchant books, trade with villagers, and loot dungeons.
That said, starting with Enchanting Books, you'll need to get an Enchanting Table, Books, and Lapis Lazuli first if you want to use this option.
You will then need to craft and obtain all of these with 15 bookcases and place them around the enchanting table with a one block buffer between the 15 bookcases and the table.
Related: How to Get Fast Charge in Minecraft?
This will in turn increase the chances of getting higher tier enchantments, and you'll also need to hold onto enchanting books until the enchantment you want appears.
However, beyond this option, you can also fish using an enchanted fishing rod. To use the enchanted fishing rod option, you will first need to enchant a fishing rod with both sea luck and lure. This will then increase the chances of getting enchanted books while fishing.
Then, after fishing, it is possible to exchange emeralds for books or loot dungeons; Overall, both are decent options but shouldn't be relied upon as they're the least likely to work in-game.
Check out some of our other awesome Minecraft guides!