Galaxy J3 Wi-Fi issues (Android 8.0.0)
Most probably this will be because of service providers issue, not from your phone.

I have seen this kind of behaviour mostly from jio network in India.
And all other network providers also now a days having this network glitches because of many criteria like tight fights in business, many changes in telecom regulations etc.,

Suggestion that I can give is place your phone in some good position where signal is best.
And you can ask your neighbors with same network if they are having internet speed issue.