Many installers for desktop Linux are also 'live' images - meaning you can test drive the operating system from the USB drive without installing anything.
Microsoft's Media Creation Tool can convert any flash drive into a Windows 11 or Windows 10 install drive, and applications like Rufus and Etcher can create install media for desktop Linux, older Windows versions, and other operating systems.
Bootable flash drives are the most common way to install or repair an operating system on a computer.