Depending on if you have a local wi-fi base station, that may see change
if you can re-set it (or replace it) ~ or some other wireless ISP arrangement
the options or answer determination may be based on hardware situation.
While I have sporadic internet connections, in part due to very old AirPort
Express (first model, early edition) that still wants to work... A few times a
week when that seems to be cause of lost wi-fi, I simply unplug it for 5 min.
• Solutions for connecting to the Internet, setting up a small network, and troubleshooting - Apple Support
You may have to look into System Information, or perhaps Console to see
if there are any notations related to hardware; there may be software cause.
If the issue relates only to Mac mini itself, you may try an SMC reset..
• How to reset the System Management Controller (SMC) on your Mac - Apple Support
..Note the sequence of steps to try before the actual reset, for best benefit.
Also see the [ NVRAM ] link at end of article, to try that. It does other stuff.