One way is to use the Align Panel (Window> Align).
Select both objects.
Click again on the rectangle to make it the “Key Object” the other object(s) will align to. It will show with a larger blue outline.
In the Align Panel click Horizontal Align Center and then Vertical Align Center.