Recently at 38 years and 299 days, left-arm spinner Asif Afridi became 3rd oldest cricketer to make Test debut for Pakistan, at Rawalpindi against South Africa. He's also the second-oldest player to make a Test debut this century, after Ireland's Ed Joyce (39y 231d) in 2018. Asif had played 57 first-class matches (198 wickets) before this call came.
The first two oldest players to make a Test debut for Pakistan are Miran Bakhsh (also written as Bux) at 47 years and 284 days (vs India in Lahore in 1955) and Amir Elahi at 44 years and 45 days (vs India in Delhi in 1952).
The oldest Test debutant is James Southerton at 49 years and 119 days and played his first Test for England against Australia in Melbourne in 1877. Miran Bakhsh is next to him and his story is very interesting, mysterious and linked with various sub-plots. It was a short-lived experiment, conceived by a family melodrama.