Mac won’t connect to internet
Apple covers the basics in troubleshooting internet connections.

Solve internet connection problems on Mac
https://support.apple.com/guide/mac-help/solve-internet-connection-problems-on-mac-mh11395/mac

This is a nice resource since it is specific to several versions of macOS and if it’s too technical, you can refine your problem by working through it and asking a follow on question with details of where you got stuck or what sort of information doesn’t make sense.
Here’s the how to connect which also might help: https://support.apple.com/en-us/HT201735