The tallest mostly wooden structure ever built in pre modern times was probably the legendary Yongning Pagoda at Luoyang, capital of the Northern Wei dynasty in northern China.
The Yongning Pagoda was described in Record of the Buddhist Monasteries in Loyang to be 90 Zhang high and 100 Zhang with the spire, or 330 meters (1082.68 feet), but in the commentary of the Waterways Classic "only" 49 Zhang or 163 meters (534.777 feet). Archaeologist Yang Honxun who excavated its foundations believed it was about 147 meters (482.283 feet) tall.
See discussion at: https://historum.com/threads/why-do-ancient-chinese-architecture-hardly-ever-go-up.46370/page-91, page 9, posts 88 and 89.
Note that the Great pyramid is 138.8 meters (455.38 feet) tall and was 146.5 meters (480.643 feet) tall when completed. The facing stones were loosened in an earthquake in 1305 and later carried away, and the pyramidion at the top is missing.
So it is possible, though not certain, that the Yongning Pagoda was taller than the Great Pyramid for a few decades.
It was completed in AD 516 and caught fire in 534, allegedly burning for months. Thus there is little evidence whether it could have stood for centuries or would have soon collapsed.
The tallest Pagoda built in modern times seems to be the pagoda at the Tianning Temple in Changzhou built from 2002 to 2007, which is 153.79 meters or 505 feet tall. But it does have a steel support structure so that doesn't count, I guess.
Renan's answer states that the giant hanger at the Tillmanhook Air Museum, Tillmanhook, Oregon is 326 meters or 1,072 feet tall. However, that is the length and not the height of the hanger:
Constructed by the US Navy in 1942 during World War II for Naval Air Station Tillamook, the hangar building housing the aircraft is 1,072 feet (327 m) long and 296 feet (90 m) wide, giving it over 7 acres (2.8 ha) of area. It stands at 192 feet (59 m) tall. The doors weigh 30 short tons (27 t) each and are 120 feet (37 m) tall. Hangar "B" is one of two that were built on the site originally, Hangar "A" was destroyed by fire in August,1992.2
The much lower actual height of 59 meters or 192 feet is still impressive.
The hanger has lasted for about 78 years since 1942 and it could last for centuries if it never catches fire like its twin did.
The Gliwice Radio Tower in Poland is the tallest existing wooden structure, 118 meters or 387 feet tall, built in 1934.
The Mjostarnet in Brumunddal, Norway, is the tallest wooden building in the world at 85.4 meters or 280.1837 feet tall, completed in 2019.
Mjøstårnet by Voll Arkitekter in Brumunddal, Norway, has been verified as the world's tallest timber building by the Council on Tall Buildings and Urban Habitat.
The 85.4-metre-high tower was built using cross-laminated timber (CLT), a pioneering material that allows architects to build tall buildings from sustainable wood.
It has taken the title of world's tallest timber building from the 53-metre-high Brock Commons Tallwood House in Vancouver, which has a hybrid wood and concrete structure. Treet in Bergen, Norway, which is 49 metres high, used to be the tallest all timber building until Mjøstårnet completed in March 2019.