You might be wondering why world 4 is never unlocked. It's pretty easy and I'll show you how to unlock it.
Steps

1 First go to world 1, level 4

Step 2. Find Mini Mushroom and become Mini Mario
Remember the block? Where the Mini Mushroom came out, as you will come back to this place later.

Step 3. Complete level in Mini Mario form

Step 4. Play level again and power up the Mini Mushroom
Make sure a bubble appears in the lower right corner; this means that you have saved the make-up for future use. Go through level again. Now you can get big, but don't change the mini in the right corner.

Step 5. Reach the final castle in World 2, and pass the level to reach the Giant Worm boss level

Step 6. Tap on the Mini Mushroom make-up you have saved for future use
Turn on Mini and defeat the worm.

Step 7. A small scene will play where Mini Mario falls into a mini hole and passes the sign, this should reveal world 4
Advice
- When jumping on the worm, press down to increase the fall on the worm.
- Try not to jump too much before the worm appears, otherwise you may land on it.
- When fighting the Worm, stay close to the edges, because he usually doesn't appear near the edges.