You can now hide command bar options (at the top) from list/library using SharePoint JSON view formatting.
Use JSON like below in view formatting to hide "Power Apps" option:
{
"commandBarProps": {
"commands": [
{
"key": "powerApps",
"hide": true
}
]
}
}
Similarly, you can add more keys to same JSON as per your requirements. Currently below keys are supported:
'new'
'newFolder'
'newWordDocument'
'newExcelWorkbook'
'newPowerPointPresentation'
'newOneNoteNotebook'
'newFormsForExcel'
'newVisioDrawing'
'upload'
'uploadFile'
'uploadFolder'
'open'
'share'
'copyLink'
'download'
'rename'
'copyTo'
'moveTo'
'delete'
'edit'
'comment'
'editNewMenu'
'powerBI'
'powerBIVisualizeList'
'automate'
'automateCreateRule'
'automateManageRules'
'powerAutomate'
'powerAutomateCreateFlow'
'powerAutomateSeeFlows'
'powerAutomateConfigureFlows'
'aiBuilderCreate'
'aiBuilderGoto'
'aiBuilder'
'alertMe'
'newLink'
'integrate'
'manageAlert'
'powerApps'
'powerAppsCreateApp'
'powerAppsSeeAllApps'
'powerAppsCustomizeForms'
'viewDocumentUnderstandingModels'
'versionHistory'
'openInImmersiveReader'
'classifyAndExtract'
'checkOut'
'checkIn'
'undoCheckOut'
'properties'
'pinItem'
'exportExcel'
'exportCSV'
'export'
'editInGridView'
'exitGridView'
'sync'
'uploadTemplate'
'addTemplate'
'openInOfficeOnline'
'openInOfficeClient'
'addShortcut'
'pinToQuickAccess'
'unpinFromQuickAccess'
Documentation: Command bar customization syntax reference
Currently there is no SharePoint out of the box option available for hiding options under context menu (...). So, you may need to do it using custom CSS/JS injection using SPFx.
However such DOM manipulations using CSS/JS injection are not supported/recommended by Microsoft.
Check if it helps: How to hide buttons on the item context menu in SharePoint 365 Modern Experience