Select the image object
Open the Outliner
Click the filter icon in the Outliner
Enable the selectable restriction toggle
Click the restriction toggle next to the image object to disable selection
Use a collection and disable selection for the whole collection if needed
Lock the object in the viewport using the selectable icon
If the image is a reference image, disable its selection in the object properties or Outliner
If using Blender 4.x, use the viewport restriction columns to make the image unselectable
