The tests add an extra layer of stress and logistics to travel, but for many destinations it's not insurmountable. After all, you could break your leg or a family member could suffer a mishap or get ill just before a trip too.
On a recent trip to Europe and North Africa I needed a full PCR test before departure (due to the North African destination's requirements), which required booking and waiting some 20 hours before the results were ready. The requirement was that the test be administered no more than 48 hours before boarding, which allowed the cheapest PCR test (still rather pricey, around $150 USD). Upon arrival they administered another test (this one free) and required contact information but released passengers immediately. Then upon return, antigen tests at the two departure points were required, which were relatively cheap ($30-ish) and results were almost immediate (45 minutes to a couple hours). In fact the European one was done at the airport just before boarding. Obviously if you test positive under those conditions you're in for additional costs and inconvenience so you need to be able to deal with that. I had a smaller laptop and over 150 books to read in epub form so a week or so would not be too irritating.
Personally, I was willing to take the risk of paying for extra accommodation, and booked (mostly) cancelable things in case departure had to be canceled due to failing the test, other illness, serious illness or death in the inner circle etc., so the total risk was acceptable to me even without insurance (have medical insurance, of course). I made a spreadsheet with items and the latest cancellation dates. There was some logistics involved in the return testing because of language barriers and opening hours allowed only a narrow window for testing. Usually you can trade money for convenience in getting faster test results.
Most destinations that I've looked at allow PCR tests to be administered 48 to 96 hours in advance, but rapid antigen tests have a much shorter window (like 24h), which is fine because the results of the former can take more than 24 hours (unless you shell out USD $300 or so) but the antigen tests are almost immediate. It's particularly confusing (and sometimes alarming) because "PCR" has become a bit genericized in some locations and even officials sometimes refer to 'PCR test results' to mean COVID-19 test results, when the cheap and fast (but less reliable) rapid antigen tests are perfectly acceptable.
Unfortunately, where I really want/need to go (mainland China) is still quite impractical- basically special permission (new visa issued with more documentation since the old visas are suspended), self-quarantine for some time before travel with multiple tests of different types, few flights (which must be direct) and then likely 21 days of supervised quarantine with many tests at the other side, something of the order of $10,000 USD in expense and a month's lost time for something that used to be $1000-ish and a day's time. Hopefully that can change in a few months but I'm not especially optimistic for 2022 as they've actually been tightening requirements even before the latest outbreaks.
So: TL;DR Review all cancellation rules before booking (some accommodation sites allow you to filter) to know and limit risk. Research what requirements are in the unlikely event that you fail a required test before leaving for home or between destinations and, at least roughly, what the costs might be. Research test locations, costs, and opening times and add those to your itinerary, and have a plan 'B' in case they are, for some reason, unavailable or you are delayed in reaching your departure city. Review insurance coverage to see exactly what you are covered for and arrange supplemental insurance if deemed worthwhile. If, after all that, the costs or risks are too high, you can always stay at home. Or go with the peace of mind that most eventualities, even unlikely ones, are covered.