On Ubuntu 24.04, the Xbox One controller does not work out of the box. It's possible to get it working apparently, but I have tried -- and, to no avail. I could have kept trying, but I wasn't interested. The process is too involved.
At one point, there was writing on Firefox saying that it could run an Xbox One controller in Ubuntu. That is not true. I tested today.
The xboxdrv script supports Xbox360 controllers. That program can be used for customizing buttons related to keyboard and mouse input. Firefox in Ubuntu 24.04 supports the Xbox 360 Controller with the JavaScript Gamepad API. Neither Xboxdrv or Firefox support the Xbox One controller.
It might be possible to use a wired PS3 controller. I will have to try that.