Scaling Laws Across Model Architectures: A Comparative Analysis of Dense and MoE Models in Large Language Models