How can I fix these artifacts?
You should observe what effect Subdivision Surface modifier has on different geometry. In this case the topology you modelled is just not good for it. If you have concave faces in your model the result of Subdivision Surface modifier will often be undesired:

This problem can only be fixed by modelling correct geometry for the modifier. You can have the modifier added and model things with it visible to see what results you get in real time while modelling. In some cases adding edge loops(ctrl + r) will help you, in some cases joining some vertices(j) or using the knife tool(k) in order to avoid concave faces might improve the situation. I cannot describe all the possible scenarios in this answer because of how many of them can be so my advice would be to experiment and see for yourself. Don't forget that you do not have to use Subdivision Surface modifier at all and can also achieve the same results using other modelling techniques. In many cases modelling inorganic shapes one can get better results simply using bevel(ctrl+b) operation.