In a weapons holdable blueprint class defaults search for attachments there you can set the following attachment settings. Below are the settings for the BP_M4A4.

Available Attachment Slot (These are the slots that the weapon can have attachments).

Allowed Attachments (This is the attachment blueprints that can be attached to the weapon).

Default Attachments (These are the attachment items that the weapon will always start with).

You can add to any of these settings by clicking the + icon and setting either the Item, Attachment Blueprint or Attachment slot.