Unfortunately this is the case with Social Media apps though think Tiktok is the biggest culprit. You could use the web version of Facebook on ocassions,ckear the cache periodically. option to put the app into sleep Mode(where it will only run in the Background ocassionally).
I do not work for Samsung or make Samsung Products but provide independent advice and valuable contributions.
Your phone is just telling you the facts, complain to Facebook for using too much memory. I would recommend enabling "ram plus" within device care. Might let your phone put Facebook's memory somewhere where it doesn't have as much impact