The army of Sultan Suleiman occupied the castle of Buda on 29 August 1541. In fact, he had decided to seize the capital of Hungary because King Szapolyai János died and his newborn son, János Zsigmond was under the care of Queen Isabela who was attempting to side with the Habsburgs.

Suleiman didn’t trust her and after defeating the Austrian army that was besieging Buda, he marched into the castle in order to oppose the Habsburgs’ future attacks: that took place the very next year...

Now, let us read about the siege of Pest in 1542, according to the research and summary of Szibler Gábor:

https://www.hungarianottomanwars.com/1541-1699/26-september-1542-the-siege-of-pest-began/

The siege in 1542: