[solved]I cannot program Arduino Uno over USB after programming it via ICSP

Hi, i was using my Arduino Uno Wifi (next time just Arduino Uno) just fine for some time, but for some reason i tried to program it via ICSP over USBasp (i was using crosspack with avrdude). I tried upload UART sketch whith i found on internet and tried to communicate with my other uC (it was very simple sketch, just to turn on and off LED on the other uC). It didnt work (proppably some problems in the code) and then i tried another very simple sketch, turning LED on specific pin on and off and it worked just fine, but when i unplugged it from USBasp and tried to program over USB with simple blink sketch i got this error:

[avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

And this is the code i tried fisrt uploading on uno to try the UART

#include <avr/io.h>
int main(void)
{
	
	DDRB |= (1 << PINB0);

	//Communicating UART specifications (parity, stop bits, data bit lenght)
	int UBRR_value = 25;
	UBRR0H = (unsigned char) (UBRR_value >> 8);
	UBRRL0 = (unsigned char) UBRR_value;
	UCSRB0 = (1 << RXEN0) | (1 << TXEN0);
	UCSRC0 = (1 << USBS0) | (3 << UCSZ00);

	unsigned char receivedData;

	while(1)
	{ 
		while (! (UCSR0A & (1 << RXC0)) );

		receivedData = UDR0;

		if (receivedData == 0b11110000) PORTB ^= (1 << PINB0);
	}
}

Ive got sure that i have selected everything correctly in arduino IDE and treid it again but no luck there. Ive read many topics on internet but none of them helped me. I tried burning the bootloader, reseting the Uno before programming and more..

But when i reseted the Uno with onboard reset button the "L" LED (connected to pin 13 on UNO) didnt blink like it supposed to do when resetting the uno and when uploading none of the Rx or Tx LED comes on either. I found that when the LED is not comming on, that may be problem with bootloader, but i cant upload that either, the ide just says

"Error while burning bootloader"

I have no idea if i messed up some fuses in the process but i tried to upload (over usbasp) "the correct ones" and no error there but same error in arduino ide.
Any ideas that could help?
Thanks.

Uploading a sketch via ICSP erases the bootloader, so it can no longer be programmed via serial (including via the on-board USB-serial adapter connected to the USB port).

To restore the bootloader, connect the ICSP programmer up the same as you did before, doublecheck that tools menu has correct board and options (if any) selected, and do burn bootloader. Now you will be able to upload using serial through the USB port again.

That worked for me,
thank you very much!