If cost price in product details screen is disabled, it is because you have a moving average price enabled.
Using moving average price is enabled by default and it is recommended way of storing and calculating cost price. With moving average price, you do not need to enter cost price manually, it is calculated automatically based on your inventory and your purchase documents.
You can read more about moving average price here.
I still want to enter my cost price manually, how do enable that?
If you still wish to enter cost prices manually, you can simply disable moving average price in Settings > Products settings.
Once you disable moving average price, you will be able to enter cost price for your products.
Price before tax
One important note to keep in mind is that cost price is considered to be before tax, so if you need to calculate markup for a product and you are using taxes, you will have to enter its sale price before taxes.