I have noticed a difference in size between the apk generated with these 2 options.
why is this happening ?
With the Build -> Build APK opti
Build APK is a shortcut for running the :app:assembleDebug
Gradle task (assuming you have the debug variant active in the Build Variants window).
When running the application, we first ask you which device you want to target and then pass the information to Gradle. Among other things, this lets us filter out unnecessary resources. If you have Instant Run enabled, we also package additional code into the APK.