For mining with an excavator, buy a map at the mining shop. Then head to a designated area on your map.
Next, prospect from the tab menu. Select the resource and click Prospect.
Then take the bucket from your inventory menu, in the tab wheel. Then place it at the end of your excavator arm.
Approach your flag, then press 1 on your numeric keypad until the bucket no longer extends.
⚠️ You should see 999999 in the top right of your screen, if not press F and if it still does not work remove the bucket, then put it back.
Then hold left click above the flag. And that until the rock stops moving.
Then step back, then remove the bucket. Pick it up, and take the jackhammer. Place it like the bucket.
Press 9 to raise the arm, then press 1 on your numeric keypad to put the hammer vertically. Then once above the rock, repeat holding the left click to harvest effortlessly.
And this until the flag and the rock disappear.
Then you can sell your resources to a company or process your resources into ingots if you are part of a company yourself.
You can also go to import-export to export your products if you are not part of a company.
Excavator control keys can be customized in your game settings:
Controls > Addon Options > FL: Excavators