How can a haploid organisms produce gametes?
They can through isogamy but not alone. They need another cell like themselves.
Isogamy is a form of sexual reproduction that involves gametes of similar morphology (similar shape and size), differing only in allele expression in one or more mating-type regions.
Because both gametes look alike, they cannot be classified as "male" or "female." Instead, organisms undergoing isogamy are said to have different mating types, most commonly noted as "+" and "-" strains.
But note that they form what are called gametes. This type occurs for example in algae and yeasts.
This form of reproduction occurred before the type we are familiar with (egg and sperm).