You can use a free tool like Sensor Box for Android to check if your phone has a "Magnetic Sensor". On iPhone, all modern models (iPhone 3GS and later) include this sensor by default.
Many budget-friendly or older Android phones (like some Moto G series models) exclude this sensor to save on costs. can't download compass app
If you , it is most likely because your device lacks a specific piece of hardware called a magnetometer or is running an outdated operating system version . You can use a free tool like Sensor