Layers of 3D objects are overlapping each other

How to divide 3D objects into layers without using UIMeshRenderer? The layers do not overlap each other as shown below:

Help me, please! I use cocos 3.8.4