Spray foam insulation has a higher R-value than fiberglass, making it a better insulator. Another difference between them is that spray foam is watertight while fiberglass cracks under moisture.
To decide between the most popular choices: fiberglass and spray foam, you should consider their R-Value, cost-effectiveness, resistance to moisture, durability, ease of installation, and health effects.
The easiest and most readily available place to buy fiberglass insulation is a store like Home Depot or Lowes.