If you've ever powered up a Pokemon to high Levels, you'll know that powering things up gets expensive. It costs 225,000 Stardust and 248 Candies to get one Pokemon from Level 20 to Level 40. Multiply that by 6, and you're looking at over 1 million Stardust to get a full team of counters for one type.
So here are your options: You can either use less Stardust and be weak, or you can grind more Stardust and be strong.
Both playstyles are perfectly valid, but if you want to be strong enough to do Legendary Raids with just 1 or 2 other people, powering up your Pokemon is a necessity.
There's no magic trick that will instantly get you 1 million Stardust. Collecting Stardust is meant to be a grind; the best method for gaining Stardust long-term is to just keep consistently catching things.
For your reference, here's all the possible avenues for gaining Stardust:
At 100 dust per catch, collecting enough to power up a Pokemon to Level 40 is a chore. Thankfully, Niantic gives us Bonus Stardust events on a fairly frequent basis. Optimizing your Stardust gain during these events is critical for maximizing efficiency.
Fast Catching is an exploit that allows you to skip the 'shaking' animation and post-catch screen, drastically increasing your catching speed. The faster you can clear out a cluster of spawns, the faster you can move on to the next area, and the more Stardust you'll get.
If you successfully caught the Pokemon, it will be in your Pokemon storage, and trying to re-encounter that Pokemon in the overworld will give you an error message.
If you did not catch the Pokemon, tapping on that Pokemon in the overworld will restart the encounter sequence.
Research Stacking is an exploit that allows you to store or 'stack' Field Research Encounters, up to a maximum of 100. Doing this can give you up to 100 additional Pokemon to catch during a Stardust event, which can add up to quite a large sum of Stardust.
If you have 100 Stage 3 Pokemon 'stacked' and you catch them all during a 3x Catch Stardust Community Day with a Star Piece active:
Combining Fast Catching with Research Stacking allows you to clear out all 100 stacked Pokemon quite quickly.
Be warned that if your stack exceeds 100 Pokemon, encounters will start to be deleted in the order of oldest to newest.
Hatching Eggs can be a good way to supplement your Stardust income, if you have extra Incubators lying around.
In terms of dust-to-distance, 2KM Eggs are the most efficient. 7KM Eggs are the least efficient, and should never be picked up if you're looking purely for Stardust and not any of the potential hatches.
If you really want more Stardust, consider investing in a Gotcha or a Gotcha Ranger.
These are accessories that, when connected to your device via Bluetooth, can spin Pokestops and catch Pokemon automatically, with no input needed from you.
While the Gotcha's catch rate is quite low, it can vastly increase your Stardust income by catching Pokemon for you when you would otherwise not be able to play (eg. when driving).