If your device supports Project Treble (introduced in Android 8.0 Oreo), it separates the vendor implementation from the Android OS framework. Theoretically, you can flash a Generic System Image (GSI).
For devices without an official KitKat ROM, you must port a ROM from a device with identical specifications (same CPU, resolution, touch panel). Here is the 2021 workflow. install android kitkat v44 on any android device 2021
By 2021:
Search XDA-Developers for a device with: If your device supports Project Treble (introduced in
Download that ROM (it will be a ZIP file named update.zip). For devices without an official KitKat ROM, you