In your opening post you report that you had to wipe and re-install your macOS, in this case you might find that you need to re-enable, or at least disable and re-enable text message forwarding for the Mac Studio in your iPhone messages config.
In your iPhone go to Settings > Messages > Text Message Forwarding then click the link "X" Devices > (where the "X" is the number of Apple devices that you have enabled text messages that arrive on your iPhone to be forwarded on to other apple devices) and in that page you will see slider buttons against the other Apple devices you own.
You should see a slider button against the entry for Mac Studio, the button should be to switched to the right and the button colour green.
If it is not selected and showing green then slide the button over to the right and then iPhone texts should be forwarded on to your Mac Studio.
If it is already green then disable the selection, exit settings and reboot your iPhone then go back to iPhone message settings and re-enable that option.
If your Mac Studio does not appear in that list then go back to Settings > (Your user name) > "Apple ID, iCloud etc" > iCloud > tap "Show All" > Messages, against Messages should be displayed "On", if it is "off" click the ">" symbol and enable the option "Sync this iPhone".
Finally, in your Mac Studio open the Messages App, from the tool bar menu select settings, click the @iMessage tab.
The option "Enable Messages in iCloud" should be enabled and the button to the right of your Apple ID name should show "Sign Out".
Click the button to "Sign Out" and wait while the sign out process completes then sign back-in and ensure that the option "Enable Messages in iCloud is selected.
If the option to "Enable Messages in iCloud" was already deselected and the button to the right of your Apple ID was already showing "Sign In" when you first opened the @iMessage tab then simply sign-in and click the "Enable Messages in iCloud" option.
HTH