This is also why things like gold or platinum are good to mine from asteroids, because they have not had the opportunity to sink to the core of those asteroids like they did on Earth. (And getting to the core of an asteroid is a significantly more reasonable proposition than getting to the core of the earth)
You use something like Starship to deliver construction equipment that can be used to build engines on the asteroid it to earth orbit for processing.
Ideally you'd bring the minimum amount of equipment necessary to do in-situ production of the rest of the equipment, but we're not at that boot-strap self-replicating level quite yet.
Or the fuel required to get the fuel you need to the asteroid.
Fuel that has to be lifted into orbit. Which requires fuel.
Go look up the costs of lifting equipment just into orbit. Then look at how much lithium is worth per kg.
Then go look at the fact that we have exactly zero manufacturing capacity in space. Simple operations and repairs using pre-made parts on the ISS take hours-long spacewalks that require weeks of planning. And you think we can "build engines" on asteroids?