Well, first up, any film that is not in the can already is now junk. Film is sensitive to light, after all, and we measure exposures in fractions of a second during the day. Cracking the back to see what's going on cannot be done fast enough to not overexpose to oblivion.
Any frames that were successfully rewound back into the can will be okay and can be developed. Anything left out is now garbage.
In the future, if you think there is a problem, use either a change bag (lightproof bag) or a 100% lightproof room. An interior closet, at night, in a dark house, with the windows closed...is usually sufficient. Sit there for 5 minutes to let your eyes adjust - if you don't see any light, then crack the back of the camera. If you do see light, then it's still too much light to work! Also, make sure your phone is in another room for this.
And yes, you are reading this correctly: you need to figure out what is wrong with your camera in complete and total darkness if you want to salvage any film that you've exposed. This is why knowing your gear inside and out is critical. By the way, here's your manual: https://www.cameramanuals.org/contax/contax_rts.pdf and here's the donate page for the gent that hosts it: https://www.butkus.org/chinon/contax/contax_rts/contax_rts.htm
Cool. Now that that is out of the way, let's move onto your stuck film:
The camera doesn't have a "rewind button machine" that does anything automatically. It has a button that, when pressed, disengages the film advance mechanism so that the film can be rewound. According to your manual, you should only have to press the button to get the mechanism to allow the film to rewind. That being said, the first thing you should do is hold it down if the film advance mechanism is not allowing the uptake spool to move in reverse.
Because the rewind button disengages when the film advance lever is used, make sure the film advance lever is not partially cranked. If the shutter mechanism is cocked, shoot the frame. Attempt to rewind again holding the button if necessary.
If the film still isn't rewinding then try this: Hold the button down and gently pull the film back toward the can. Many new shooters get a little too powerful with the film advance lever and, after the last frame, they manage to pull the film right off the inside of the reel. Since it is this reel inside the can that spins to roll the film back up, if you've ripped the film off this reel then spinning the rewind crank handle will do nothing. So, attempt to get the film off the take-up spool by simply pulling it with your fingers.
If this still doesn't work, then cut your film out of the camera.
Once all of the film is out of the camera, do a function check on film advance and rewind. Grab a roll of film that you'll sacrifice and load it into the camera - keep the camera back open. Run through advancing every frame and then, once at the end, go through your rewind procedure.
If everything works, then you're good to go. Pending what works above, you may have ripped the film off the spool or suffered it getting bent and stuck in the take-up spool. The first is something you learn to not do - you'll get a feeling for when you are at the end of the roll based on feel when attempting to advance the film. The second usually happens earlier in a role due to improperly loading, but could happen near the end as well if you get particularly zippy with the advance and cause the film to jump a sprocket. Again, this is solved through experience.
If something doesn't work along the way, then a mechanism in the camera will need some professional attention. Look for camera repair and get it CLA'ed (Cleaned, Lubed, Adjusted). If it needs more than that, the repair shop will let you know. Be prepared to spend more than the value of the camera to get it fixed up.