Put the new tank on the bowl, following the assembly instructions. Generally there are two bolt holes in the bottom of the tank. Install the rubber gasket flange between the tank and toilet, then bolt the tank to the bowl. When the bolts are snugged tight against their rubber washers, reconnect the water supply line, turn on the water, fill the bowl, and check for any leaks. You can, but be prepared for possible trouble.
Water getting between the window and the interior wall is the problem.
It may lead to wood rot and can also cause tile or other surrounding finish material to separate from the underlayment. A better solution is to install a glass or acrylic block window flush with the wall that is sealed and caulked all around its edges. Some block windows have a small awning window at the top that opens to allow shower steam to escape. Tub surrounds can be cut to accommodate a window, and some include special vinyl wraps to fit around the window and seal all openings. You might also put a small shower curtain across the window to keep water off it.