You can use the plugin QuickOSM for this purpose. After you have installed it, go to
C:\Users\YourUsername\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\QuickOSM\resources\ogr\to_be_modified_osmconf.ini and open the .ini file with a suitable texteditor like Notepad++. Search for the line called
attributes= within the desired geometry type and add your desired attributes separated by comma. For example:
attributes=name,highway,waterway,aerialway,barrier,man_made,maxspeed,access,foot,vehicle,bicycle,tunnel,bridge. Save the file.
Now open QuickOSM and navigate to "OSM File". Choose your file to open, the desired geometry type and set your OSMConf file you have just modified. Click open. (If you did not create a new .ini file and just override the original file, there is no need to set it, because it is the default file).
The file will now load with the fields you have just specified and the associated values.