In a small saucepan set over medium heat, add the olive oil, diced red onion, and salt. Cook until the onion begins to soften and become translucent, about 3 minutes.
Stir in the mustard seeds, pepper flakes, and cook for an additional minute. Pour in the vinegar and sugar, stirring to dissolve the sugar. Bring the mixture to a simmer and cook for 3 minutes, stirring often.
Whisk in the dijon mustard and half of the chopped apricots. Bring back up to a simmer and cook until the apricots are plump and the mixture begins to thicken to a jam-like consistency, about 10 minutes.
Once the mixture is thick, turn off the heat and add the remaining chopped apricots. Cool the mostarda to room temperature and store in an air-tight container in the refrigerator for up to one month.