It would depend on the version of PHP you're using, I believe the
get_magic_quotes_gpc
function was removed in PHP 8.0. I'd suggest you're either using an older version of Wordpress which had the dependency on that function, in which case you need to upgrade, or you'll need to downgrade your PHP version to < 8 in order for the function to become available.
Worth noting that the
documentation page[
^] explicitly states that it's deprecated, so using it should be avoided where possible.