While the Lumia 520 originally ran Windows Phone 8.0/8.1, developers eventually ported entirely different operating systems to the device. postmarketOS Wiki Android Ports
For Android or Linux, you must flash a compatible TWRP image to the recovery partition using fastboot commands. nokia lumia 520 custom rom work
Modifying a Lumia 520 requires a Windows PC, a reliable micro-USB cable, and patience. While the Lumia 520 originally ran Windows Phone 8
To start any custom ROM work, you need specific software to interface with the Lumia's locked filesystem: a reliable micro-USB cable