How to straighten edges?

Hi, I am drawing a floorplan, and I am making a 3d model, but I want to know if there is a function to select the entire model and make all the corners 90 degree angles, so like select and snap it into place

You should use the inferencing system while drawing the floorplan to create perpendicular edges.

There is no built-in magic button to correct your off-axes errors.
These will help you understand how to work quickly and accurately in SketchUp.