After I connected my Xbox Elite 2 controller to my computer I tested it to see if it was connected by pressing the Xbox symbol to bring up the xbox gamebar, it worked properly.
when i opened up Minecraft, i could not control my character or use the UI with my controller.
Ok so I restarted the game a third time and now it works with my controller but i would like this to be investigated sometime