Hey, I can see why you would get confused with this, basically in most cases you can use either 'from' or 'of', I tend to say 'of' but that's just my dialect; in this case it would be better to say: " cooking oil is made from palm oil", it sounds better but you could say 'of', either way you will be understood; if there is a technicality about it most natives wont know and hence wont notice the e