It was released with Android 6 and then later got 2 major upgrades (from 6 to 7 and 7 to 8) like all Samsung phones at that time. Android 8 was the last official version that A5 2017 received.
wait you are actually right
your best bet would be is to install twrp, format system, boot, data, cache all that stuff, and extract system.img, boot.img from a 6.0 firmware for the a5 2017, and then flash it like a gsi. this could be a hit or miss, as it wasnt usable on my j5 2016, as i didnt have wifi, but perfectly fine on my s9.