I have a 5 pin joystick (which i tested with a library example and in serial moniter show it works) and i want to be able to code my Arduino UNO R4 wifi so the joy sitck controls either an esc or a normal power dependant drone motor. Any ideas appreciated.
Which ESC? Some can respond to the exact signal that the Servo library lets you create.
The two things - joystick and motor control - have nothing to do with each other.
If you have a sketch that shows numbers changing plausibly as you manipulate a joyst8ck that's half.
If you can write a sketch that controls an ESC, that's the other half. The only connection between the two is a number, along maybe with some transformation to change the range of the numbers you get from the joystick so they are appropriate for the ESC.
Regular powered DC motors can be controlled with PWM as provide by analogWrite() but you will certainly need a driver circuit between the Arduino and the motor, either a transistor or MOSFET and a few other parts, or a module that has such a circuit on it ready to go.