Re: fossils. Example: http://www.museumgolling.at/wp-content/uploads/2022/09/9_Sch...
But there are other lines of evidence that work in similar ways. They are based on the discovery and dating of fossils at altitudes where that form of life can't exist today because it's too cold, and then from that calculate how warm it must have been at the time (much warmer than today, even in the relatively recent past).
Re: tree rings/ice cores. These are called proxy reconstructions and they routinely conflict with each other, meaning they can't really be temperature proxies. Nonetheless, PCs are regularly discarded in a form of industrial scale cherry picking in order to create a hockey stick. An example of the problem is here, where proxies are randomly selected and plotted showing how almost none of them show any kind of hockey stick:
https://climateaudit.org/2021/08/11/the-ipcc-ar6-hockeystick...