It all depends on the luminosity of the star the planet orbits.
An astronomical unit or AU is the average distance of Earth from the Sun. The astronomical unit is now defined as 149,597,870.7 kilometers or 92,955,807 miles.
For a long time "the great and glorious" S Doradus was considered the most luminous star known, but now it is the last on this list:
R136a1 in the Large Magellanic Cloud has a luminosity of 8,710,000 times that of the Sun. As I remember, the distance to get an equal amount of radiation should vary by the square root of the luminosity. Thus if a star was four times as bright as the Sun a planet two AUs away from it would get the same amount of radiation as Earth gets from the Sun.
Thus my calculations indicate that a planet orbiting R136a1 at a distance of 2,951.2709 AUs, or 274,337.740,000 miles would get the same amount of radiation as Earth gets from the Sun!
Once source lists the least luminous normal star as 2MASS J0523-1403, with a luminosity of 0.000126 the mass of the sun.
According to my calculations, a planet that got as much light from 2MASS J0523-1403 as Earth gets from the Sun would orbit at a distance of 0.0354964 AUs or 3,299,596.5 miles.
Thus the distances for planets to get from their stars the same amount of energy that Earth gets from the Sun have a range of 83,142.822 times between the brightest and dimmest stars.
But this is just for fun.
If you want to know how far from its sun a planet habitable for humans can be, or an Earthlike planet old enough for complex life to have evolved on it, then there is a wide but much narrower range of possible distances from their stars.
Only some types of stars, with a much narrower range of Luminosity, are suitable for having human habitable planets, or planets with advanced lifeforms.
The most massive types of stars use up their fuel so fast that they remain steady main sequence stars for much too short periods to develop complex life or an oxygen atmosphere that humans cna breathe. Several billion years are needed for such developments.
One source says that suitable stars for for complex lifeforms or habitable planets range from spectral types F2V to K5V. The letters mean that they range in mass size, and temperature from hotter F types to G types to cooler K types. the numbers subdivide each class, from the hoteest 0 stars to the coolest 9 stars. V means that the stars are main sequence stars and not any type of giant stars.
So if the range of F2V to K5V is correct the suitable types of stars would include F2V, F3V, F4V, F5V, F6V, F7V, F8V, F9V, G0V, G1V, G2V (the Sun is a G2V), G3V, G4V, G5V, G6V, G7V, G8V, G9V, K0V, K1V, K2V, K3V, K4V, and K5V.
So if a star of a specific spectral type has a specific luminosity, an Earth like planet will have to orbit within its Goldilocks zone or habitable zone in order to have temperatures suitable for life.
How do scientists calculate the inner and outer edges of the habitable zone of a star?
This Wikipedia article on "Circumstellar Habitable Zone" lists 11 separate estimates for the inner and/or outer edges of the Sun's habitable zone, and they differ a lot.
Their great disagreements about how narrow or broad the habitable zone is suggests that if a writer wants to have only one habitable planet in his star system he should put in at the distance suggested by the narrowest estimate and/or the middle of the suggested habitable zone.
if a writer wants two or more habitable planets in his star system he will have to use a broader estimate of the habitable zone.
One paper that gives the Sun (a G2V star) a habitable zone of 0.8 to 1.5 au suggests that an F0V star would have a habitable zone of 2.0 to 3.7 au and an F8V would have a habitable zone of 1.1 to 2.2 au. This suggest that writers should usually keep their habitable planets within 3.7 au of their stars.
A planet orbiting Alpha Centauri A (G2V) could receive Earth's amount of light at a distance of about 1.25 au.
A planet orbiting Alpha Centauri B (K1V) could receive Earth's amount of light at a distance of about 0.7 au.
A planet orbiting Epsilon Eridani B (K2V) could receive Earth's amount of light at a distance of about 0.61 au.
The habitable zone for Tau Ceti (G8.5V) where liquid water could exist on an Earth-like planet, is from 0.55 to 1.16 au. Two suspected planets, Tau Ceti e and Tau Ceti f, might orbit within the habitable zone.
The habitable zone of 61 Cygni A (K5V) where liquid water could exist on an Earth-like planet, is 0.26 to 0.58 au.
The habitable zone of 61 Cygni B (K7V) where liquid water could exist on an Earth-like planet, is 0.24 to 0.50 au.
This gives a fair indication of the sizes of habitable zones in stars in the F2V to K5V range.
Stars in the K and M spectral classes fainter than K5V also have habitable zones, but those habitable zones are so close to the stars that habitable planets in those zones would belong to one or two rather strange and exotic types instead of being generic Earth-like planets.
Writers who Want to set their stories on typical average generic Earth-like planets should stick to F2V to K5V type stars and planets that orbit between about 0.25 to 3.0 au from their stars.