I can't upload my code to Leonardo

Maybe normal behaviour with IDE 2.x.x

https://forum.arduino.cc/t/pro-micro-programming-issue/1066066

pay attention to the notifications in the right bottom, it will tell you if the upload failed or succeeded.