The actual functionality you describe may not be the best way to do something like have an user accept some terms, but I'll try to answer you exact question.
This is something you'd probably handle client-side in javascript, first intercepting the form action and displaying your message or alert, then noting that it had been shown, then on the second click letting the default action take place.
let shownWarning = 0
function showWarning() {
if (shownWarning == 0) {
window.alert('your message here');
shownWarning = 1
return false;
}
return true;
}
<form onclick="return showWarning()" action="">
<button type="button" class="btn btn-info">Proceed</button>
</form>
There are lots of examples already available though on how to show confirmation or messages before proceeding with submitting a form, the simplest of which might be an inline confirmation dialog:
<form onsubmit="return confirm('By proceeding you agree to everything .....');">
JavaScript Form Submit - Confirm or Cancel Submission Dialog Box
Add a confirmation alert before submitting a form