To my understanding, the Golden Bull of 1356 determined that there will be 7 electors. So how did succession work in the HRE before? Did they just pass from father to son like other hereditary countries do? Or do they still do some sort of elections and it just happened that the throne got passed in the same dynasty (Ottonian, Salian, Hohenstafen)
The Golden Bull codified the practice of Electing the Emperor, but it wasn't the foundation at the base of the idea of Imperial Elections.
Which princes had the right to elect the king gradually evolved from a large group to the select 7 electors mentioned in the Golden Bull. In the Sachsenspiegel from around 1220, it was already established that Mainz, Cologne, Trier, Brandenburg, Saxony and the Palatine were the ones to Elect the king. The Bohemia king was left out, as he was 'not a German'.
Who counted as Electors could still vary, as practices could still be quit fluid. For example, when William II, count of Holland was chosen as anti-king, he was Elected by the three archbishops of the Rhine and his uncle the Duke of Brabant. (Although it might be that the Duke only recommend William to the archbishops). When William's rule was recognised in the north of Germany, he was 'elected' by the lords Brandenburg, Saxony and Brunswick. Medieval elections were more a confirmation by the great lords of the realm than a strictly followed procedure with set participants.