Yes, there are term life policies you may purchase to provide you with coverage to pay for your funeral expenses.
However, since term life is temporary, you may end up outliving your term life insurance coverage.
But, you can choose a permanent life insurance policy which would provide you with lifetime protection, so you will not outlive your coverage.
That way, you can make sure there is a death benefit pay out from your life insurance to cover the cost of your funeral.
Learn more about life insurance for funeral costs.