Hello @jb_devel ,
welcome to this moderated Azure community forum.
the Azure IoT Hub shows metrics about the number of devices being connected.
This metric is not real-time, it is updated once every few minutes. And it does not show a reliable history of connections/disconnections.
On the other hand, the IoT Hub exposes non-functional events about devices:

There are events for creating and deleting devices, for changes to the device twin, and connectivity.
Check this blog post about the details on how to configure this via the routes.
It references the deprecated TimeSeries Insights service but you can also route the messages to the free Azure Data Explorer (or a paid one with an SLA) via a stream analytics job and an eventhub.
This stream analytics job is needed because the details of the connection state and the device name are in the application properties. The Azure Data Explorer is not capable of exposing application properties in the database.
Therefor, the application properties should be moved to the actual message body.
As @Manas Mohanty mentioned, the IoT Hub also exposes EventGrid events for this.
If this is too complex at this moment, you can start with routing the events to a blob file in a storage account.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.