@eightyeight
I doubt you’ve done any damage
all that has happened is that you have reduced the volume of brake fluid in the master cylinder (brake lever) by allowing the brake caliper pistons to close, without any disc brake rotor being present
when you reset the caliper by pushing the pistons home, all you are doing is pushing that displaced fluid back up into the master cylinder
it might be worth having a look at your brake levers after sorting your brakes, to make sure you have the reach adjust (distance between lever blade and handlebar), and pad contact adjuster (dead stroke adjuster i.e. how far you pull the lever before the brake works) in the right place, assuming your brake has these adjustments.
Many budget brakes will have the reach adjuster (sometimes a twiddable knob, often an allen key fitting), its generally the more expensive brakes that have pad contact or dead stroke adjusters