You can do this in all editions of Minecraft by going back to the end.
Meet the requirements.
• You should have killed the ender dragon, and you must have a portal open to travel back to the end.
• Procure the necessary resources.
• You need the following ingredients to respawn the dragon.
• Collect 4 ender pearls, 2 blaze reds, 4 ghost tears, and 28 glass blocks.
• Open your crafting table to open the crafting interface.
• Craft blaze powder.
• Put your two blaze rods in the middle square of the crafting interface.
• Click or tap the stack of 4 blaze powder and click or tap your inventory to move the blaze powder to your inventory.
• Craft your eyes of ender.
• Place 4 ender pearls in the middle square of the crafting interface.
• Click or tap the pile of four blaze powder and click or tap your inventory to move the blaze powder to your inventory.
• Craft your eyes of ender.
• Place four ender pearls in the middle square of the crafting interface and shift the eyes of ender into your inventory.
• Craft four end crystals.
• Place eyes of ender in the middle square.
• Place four glass blocks in each leftover square.
• When the violet end crystal icon appears, you can put the end crystal to your inventory.
• Go back to the end.
• Place the end crystal on top of the middle block of each edge.
• Please wait for the dragon to respawn, at which point you can fight it again.