Create bootable macOS USB for a non Apple computer
macOS doesn't generally support installing and running on non supported hardware, i.e. non Apple computers. Apple, unlike Microsoft doesn't license its operating system for running on commodity PCs.


  It seems that it only works on Mac. My laptop does not detect my Mac bootable USB as a bootable one on startup.


This is by design. A macOS bootable USB can only boot a compatible Apple Mac computer.


  Is it possible to create a bootable macOS USB for by Ubuntu 20.04 - Windows 10 dual boot HP laptop with persistence (optional) so that I can use it by just plugging it in during boot up for building my flutter projects?


Generally speaking, no.