Although some people use Loss and Cost function synonymously they aren't the same exact thing. Loss Function is defined per prediction (data point) while Cost Function is the sum of all Loss Functions (all data points or predictions) over your training.
So Cost Function is more generic and include multiple Loss Functions.
Hope that helps and happy to further discuss if you want.
Cheers.