In the sentence, the phrase of a cave bear functions as an adverb prepositional phrase.
An adverb prepositional phrase modifies a verb, adjective, or adverb. It usually tells when, where, how, why, or to what extent (how many, how much, how long, or how far), and under what condition.