In addition to the other great answers mentioning you'll want to use a thinner wire (so you can get more wraps around your nail), something else you'll want to check: your nail looks like it might be stainless steel?. Many types of stainless steel are not ferrous (not magnetic), so it would not be a good core for your electromagnet. You can test this by seeing how well your nail is attracted to other magnets. An iron nail would work better.