You can download buildings as polygons from OpenStreetMap (OSM) - worldwide. Use e.g. Quick OSM plugin (screenshot 1).
If you have an attribute for the hight of the building, you can use this to get 3D rendering of the polygon. Some OSM buildings already contain an attribute value for building:levels
. Use this in 3D View
of Layer Styling
(or create a new field and and height-values), where you can set this attribute for Extrusion
. Then open Menu View / New 3D Map View
: the buildings that contain a value for the building:levels
attribute are now shown in 3D (see screenshot 2).
Another option would be to combine the polygons with a Digital Surface Model (high resolution, best get LIDAR data) to get the 3D shapes of the buildings from there.
Screenshot 1: downloaded building polygons from OSM with QuickOSM Key=building
:

Screenshot 2: 3D extrusion of buildings, based on OSM attribute building:levels
:
