Install the AVR development tools for Ubuntu using the commands below.
sudo apt-get install gcc-avr binutils-avr avr-libc
sudo apt-get install avrdude
For WSL2 Arduino programming you will need access to the USB serial port on the Arduino. This is accomplished from WSL2 through Windows using usbipd_win.