Although it no longer exists, Middlesbrough is in Cleveland. I still use Cleveland as a postal address when sending cards to my folks in Stokesley.
Also, Yorkshire / North Yorkshire is the best place in the world
It’s in the “Cleveland” postal area which uses the TS postal code (unofficially “Teeside”) bit like you say the county of Cleveland doesn’t exist. It only existed briefly and the area was in North Yorkshire for longer before and longer since.
As with the other poster highlighting that Middlesbrough is in the conurbation of Teesside, highlighting the postal area doesn’t negate the fact that Middlesbrough is in North Yorkshire.
So we can conclude after several posts:
Middlesbourough is in the county of North Yorkshire
It is part of the conurbation of Tessside (which contains parts of the counties of County Durham to the north and North Yorkshire to the south)
It is in the TS postal area, which is referred to by the name of a now defunct county called Cleveland, unofficially it is the Teesside postal area.
Some people have a chip on their shoulder re: whether Middlesbrough is in Yorkshire or not, this is sort of like the reverse of the people who want to pretend that the London borough of Richmond is in Surrey.