Cut the onion into rings. Pour a little oil into the pan to lubricate the bottom, put the onion, add salt and cook over medium heat for about 15 minutes, until the onion becomes soft. Add pepper, balsamic vinegar, sugar and garlic. Mix thoroughly and cook for another 10 minutes on low heat. You can immediately put it in a jar, because jam can still be stored in the refrigerator.