I would like to create a magnet using electricity. What is the best material to do this? So I would take a bar and wrap it with wire and apply a DC current to it. This would then create a permanent bar magnet.
what is the best material to use for the bar? any good sources to buy/get it this material?
No, that makes an electromagnet. TO make a permanent magnet you need to heat the right material up past the curie temperature so the magnetic domains in the material can be moved around, expose it to a strong magnetic field to align the those domains, and let it cool in that magnetic field so that the magnetic domains freeze in place with that alignment.