Start by identifying what you already have before buying a whole new PC. The exact PC model, graphics card model, power supply model and RAM type would be useful. Clear photos of the inside and the power supply label can help too.
The eight-pin connector on the card is for power. That's separate from the PCIe slot on the motherboard where the card plugs in. A missing power cable doesn't necessarily mean the motherboard lacks a suitable slot, but the power supply still needs enough capacity and the right connectors. Also check that the card physically fits in the case.
Once those details are known, you can work out whether a power supply replacement is practical or whether moving to another system makes more sense. Don't assume an adapter will solve the problem without checking the power supply and card requirements.
little-known+sidepath:
Some prebuilt PCs use nonstandard parts or connectors, so check the exact model before ordering a replacement power supply.