How to make lava in Minecraft?

I just started playing recently and i don't know what I'm doing lol… I wanted to make a moat of lava around my house in creator mode but I'm not so sure how.

It's the same way as making water, you need a bucket of lava then just place it wherever

If you want lava in creative, the easiest way is to search for it in your creative inventory. Bucket of lava.
If in survival, you will need to find pools of it underground, or on the surface. Lava can't be turned into an infinite source block like water.

In creative mode, you'll need to use a bucket of lava to fill in your moat. Please be aware that in survival mode, the lava you harvest is not a "source block"… So there's a finite (although it's virtually infinite, based on the random generation of the world & realms) amount of lava there.

CAUTION: FLAMMABILITY HAZARD -- Please be aware that any flammable materials with 2-3 blocks of lava (not covered with a non-flammable block) may catch on fire. This does include grass. It's strongly recommended that you use non-flammable materials around your moat to avoid any unexpected fires.

You make yourself a bucket and then go mining until you find yourself a lava source. Fill you bucket and then dump the lava in the moat. Repeat until it's full.

You can't craft Lava.

Just make sure you line the moat, and at least the adjacent blocks with stone - to avoid causing a unintended fire.