The second you are fired, you no longer have an H1B to transfer (usually USCIS allows transferring even if there is a short lapse, but this isn't guaranteed, and during that lapse, the visa holder is actually the US illegally)
This isn’t correct. Once you have an H1B it’s yours for 3 years (plus a 3 year extension). If you lose your job you can use the remaining eligibility for another job, though you may have to do your job search from outside the country.