Welcome to Android Central! For devices on Android 10 and above, Android Auto is built into the system, so there's no need to install the app separately. The problem with your Galaxy A03 Core is that it runs Android 11 Go Edition -- Android Auto is not supported on Android Go, which is the stripped-down version of Android designed for low-spec phones.
The Moto G 5G (2023) runs full Android, so it should be fine.