There are extensions that need another extension (father) to work, specifically a precise version of it.
You need to define the installability in ext.php, quite easy if the father got a db/config version, if not you should rely on the composer.json file of it to do your checks, exploring its metadata, have a look here on how I did it in this case (validated):
https://github.com/3D-I/h24as/blob/be0a ... hp#L43-L79
The above extension, once installed, doesn't require further checks in the code, that's another story though.
Instead, if you need to create conditional you can also want to have a look at what I did here, in another validated extension of mine:
define a function which test the ext's enabled status and if there are related db/configs in the DB
https://github.com/3D-I/tpotm/blob/cab5 ... hp#L64-L78
https://github.com/3D-I/tpotm/blob/cab5 ... #L643-L657