To detect isomorphic graphs Is it enough to check if they have the same number of same degree vertices?
No. If two graphs have different degree sequences, they are definitely not isomorphic, so the algorithm "half-works". But consider a six cycle versus two three-cycles. Both graphs have six vertices, all of degree two; they are not isomorphic.  Indeed, this counterexample shows that nothing based solely on degrees can work.