I would like to use openwrt, I loaded this image directly on the edgeos and after that I could no longer access the router's ip, I apologize for my ignorance and appreciate your help, I have the ttl usb cable if necessary but I am totally lay on the subject.
Also get the official sysupgrade here and keep it on your PC for the next step: https://downloads.openwrt.org/releases/19.07.4/targets/ramips/mt7621/openwrt-19.07.4-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin
Note that though the name is .bin, it is actually a .tar file and should be compatible with sysupgrade.
Boot the initramfs from the bootloader then move the Ethernet cable to port eth1 and establish an Ethernet connection to OpenWrt. ping 192.168.1.1 should return results then try http://192.168.1.1. If the page throws an error or doesn't load completely, clear your browser cache.
On the web page select System--Backup/Flash Firmware and Flash Image at the bottom. Use the sysupgrade image you downloaded.
I connected the lan cable to eth1 and when pinging with the automatic ip it gave an error, when placing the gateway manually I managed to ping but still not access the router's page
You cannot use the official kernel images because they are to big in size and do not fit into kernel partition. You have to use the community built kernel images or make your own build.
As you have an USB-TTL adapter now and your device was bricked before you should first re-install EdgeOS and upgrade your Bootloader to the most recent version to make TFTP recovery more convinient for future. You can follow this guide:
After the device has rebooted connect your PC to eth1 of EdgeRouter (you should get a DHCP IP now) and upload the sysupgrade image to the device, access the device via SSH and install the firmware to finish installation process:
You have to adjust this path (/path/to/your/kernel-image/) to the downloaded file or execute scp from within the directory where the downloaded file is (ofc without path then; just the filename) actually.
You are uploading with scp the downloaded file to the router itself.
you are already on the router! you have to scp from your pc where you downloaded the file!
open an new cmd and enter the command for upload from there.