The problem#
You know how to make a bootable flash drive, but you want to actually use it to install a permanent operating system (OS) onto your computer.
The solution#
Luckily, modern OS installs are very straightforward. Just download the installation image (e.g. Debian Linux or Windows 11), put it on a flash drive, boot off it, and click "Next" a few times and wait a bit. The defaults will usually erase all data on the computer, but if it's a new computer, there's nothing to erase.
Of course, you can make things more complicated if you don't like the defaults, have a special situation, or just want to know more precisely what's going on.