How to make a menu with submenus?

Hello. Please, could you tell me how to program the popup menu using menu smart action or other actions? I know how to do it from the frontend point of view, I’m interested in the question from the backend point of view. Unfortunately, at the moment, the menu smart action only works correctly for a single-level menu by default. A similar question has already been asked on the forum, but, unfortunately, it remained unanswered: Submenus in WordPress

I would like to program something like this (picture from the internet):

We have an interesting tutorial here: Adding multiple levels of submenus to a Bootstrap 4 navigation bar in your WordPress theme | Pinegrow Web Editor

Note: It’s a “hack” for Bootstrap 4 because, by default, since Bootstrap 4 if I’m not mistaken, multi-level menus are no longer supported by the framework.

You’re right, mlddm (multi-level drop-down menus) were last seen in Bootstrap 2.