Is it possible to make OpenStreetMap work like Wikimapia?

The closest thing on the main site today is the Map Data layer, which you can enable from the Map Layers sidebar:

With this overlay enabled, click any of the elements highlighted in blue to see the details about that element. This isn’t quite comparable to what Wikimapia exposes, since the OSM data model differs from Wikimapia’s, as @Kovoschiz explains.

Yes, this would be trivial for any map powered by vector tiles and a library such as MapLibre GL JS or Mapbox GL JS, using the maplibre-gl-inspect plugin.

For example, in response to a discussion about abandoned railways, I whipped up a quick demonstration of combining OSM and OHM in the same map. OHM isn’t relevant to this discussion, but I happened to install maplibre-gl-inspect with one line for debugging purposes. Thanks to this plugin, you can click the button in the upper-right corner and hover over each feature to see its properties according to the vector tiles:

Unlike the Map Data overlay above, the vector tiles apply some transformations and filters to OSM data, so take the specific properties with a grain of salt.