Is it true that the only correct preposition for the following phrases are:

"in the world"

"on the planet"

Thanks in advance!
You have given no context. Almost any preposition can go with any noun.

We talked about the world of cooking.
George has traveled throughout the world.
Braunowski considered his novels as gifts to the world.

Science has allowed us to travel to the planet Mars.
The asteroid crashed into the planet.
Environmentalists are worried about the planet.

Yes. Not at all.
 CalifJim's reply was promoted to an answer.