Instagram is owned by Facebook. Your relatives and friends are Facebook users too, chances are almost everyone are on WhatsApp as well (also owned by Facebook). Facebook knows who you are (good) friends with, who your relatives are, what content you are interested in; thanks to invasive permissions like location also where you live, which places you tend to visit, your hobbies and eating habits, lifestyle. I could go on for hours. This data is then fed by other enormous companies like Amazon whom you also share insane amounts of data with (think of all the things you buy from there), selling and buying data between each other, filling the missing puzzle pieces.
Now remember, all of this applies to your father and everyone else too. Algorithms are then let go on this endless stream of data and you have them dissect predictable behavioral patterns and output this kind of incredibly accurate advertisements.