You can download it from OpenStreetMap.
- Go to https://OpenStreetMap.org zoom to area where you want to download the openstreetmap data. This data includes all data including roads, buildings etc. You will have to select smaller area within a city to download. If you need to download for whole country. Download it from the geofabrik server directly https://download.geofabrik.de/europe/italy.html
- Once the OSM file is downloaded, export it in QGIS. Layers->Add Layer->Add Vector layer. Select only layers with MultiPolygons dont select others.
- Filter the layers you have added by selecting them and do right-click -> Filter.
- In the filter dialog provide the condition
"building" is not null
Doing this will filter out all features which are multipolygons and not buildings, so that you will be left with only buildings.
- Once done with the filter, select the layer and export it to your preferred format like geojson or ESRI shapefile format which you can use it for your purpose.